Add support for arrays of non-primitive type