How to get an array of values of node ids from entity reference field with EntityMetadataWrappers
Should be as simple as:

$ids = $wrapper-&gt;field_foo-&gt;raw();


And if you want an array of entities instead:

$entities = $wrapper-&gt;field_foo-&gt;value();