Adding support for objects that return arrays