Restructured array generics to make it more maintainable