generating an array of all possible metadata values for an entity

Hi,

I was wondering if there is a built-in function, that for any entity (in my case, users) it will return all possible values of an individual piece of metadata. I couldn't see anything appropriate in http://reference.elgg.org/engine_2lib_2metadata_8php.html

For example, all current values stored for the metadata named 'company' for the entity 'user'.

Or is the simplest way just looping through an array of all current users entity objects, inserting the particular company value into an array of results?

 

Thanks