Using integer with multiple values in Form API
I got the solution from Save a new value with entity_metadata_wrapper to an entity field which is an array.

I created two separate form fields.

function createnode_form($form, &amp;$form_state){ 
  $form['field_student_age'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('test'),
  );

  $form['field_student_age2'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('test2'),
  );


Then I stored them using the first method in the post quoted above.

$ewrapper-&gt;field_student_age[] = $form_state['values']['field_student_age'];
$ewrapper-&gt;field_student_age[] = $form_state['values']['field_student_age2'];


Rather than using set as I'd done with single values, I created a new entry for each value using [] =.