In the code you gave as and example, all of the images are stored in a single field. You’re difference is that the values are stored in a field associated with each user.
First you need to query all of the users https://codex.wordpress.org/Function_Reference/get_users
then you need to loop through the list of users and get the value of the field for each and from this get the file path and add it.