Get an array of modifier names from modifier masks.
Lookup of modifier names is required in several places, thus it makes sense to move it to a general place.