Is it possible to create a WordPress table using array and loop?

This is a code review question more than a WordPress question. Please post these in the Code Review Stack Exchange in the future.

You have a couple things wrong or not according to best practices. Comments inline for where I made changes.

$cr_table_array = array(
    array(
        'data_field' => 'id',
        // Add primary key here to allow you to keep definitions in one place.
        'data_type'  => 'MEDIUMINT(12) NOT NULL AUTO_INCREMENT PRIMARY KEY',
    ),
    array(
        'data_field' => 'your_name',
        'data_type'  => 'VARCHAR(200) NOT NULL',
    ),
    array(
        // misspelled
        'data_field' => 'your_email',
        'data_type'  => 'VARCHAR(200) NOT NULL',
    ),
);


global $wpdb;
// Use .= to append your statement pieces into a single variable.
// Use curly braces for inline vaiables.
$sql = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}credofy_contact_form( ";
foreach ( $cr_table_array as $file ) {
    $sql .= $file['data_field'] . ' ' . $file['data_type'] . ', ';
}
// Remove the final comma to prevent sql errors.
$sql  = rtrim( $sql, ', ' );
$sql .= ')';

// This will create your database. You can stop here.
$wpdb->query( $sql );

global $wpdb;

$statement = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}credofy_contact_form( ";
foreach ( $cr_table_array as $file ) {
    $statement .= $file['data_field'] . ' ' . $file['data_type'] . ', ';
}
$statement  = rtrim( $statement, ', ' );
$statement .= ' )';

$wpdb->query( $statement );