remove unnecessary ToArray conversion
remove dependency on implicit order of enum members