added test for direct polymorphic arrays and fixed to make pass