Anyone manage to work entity metadata wrapper with profile2 entity?
The problem is that profile2_load_by_user() returns an array of all user profiles by default, whereas entity_metadata_wrapper() needs a single entity object. 

Try loading a single profile:

$profile = profile2_load_by_user($account, 'profile_name');
$wrapper = entity_metadata_wrapper('profile2', $profile);
$wrapper-&gt;field_first_name-&gt;set(devel_generate_word(mt_rand(6, 12)));