adding support for generic arrays