added tests for array typecaster. added ability to pass in array serialized to JSON