I got the solution from Save a new value with entity_metadata_wrapper to an entity field which is an arraySave 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, &$form_state){
$form['field_student_age'] = array(
'#type' => 'textfield',
'#title' => t('test'),
);
$form['field_student_age2'] = array(
'#type' => 'textfield',
'#title' => t('test2'),
);
Then I stored them using the first method in the post quoted above.
$ewrapper->field_student_age[] = $form_state['values']['field_student_age'];
$ewrapper->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 [] =
.