looping over all my site's users

You can’t do it like that.

If you need to get all your the member’s role, I think you’ll have to store the roles in a database collection.
Then you’ll be able to run a query the collection (you’re better do it from the backend put it in a jsw file and import it to front-end and call it from there).

[Guys, if there’s a better way, please correct me]