Optimized enum_array