Each of the PDataType enums has an object representation. For example, for INTEGER, it's java.lang.Integer, for BIGINT, it's java.lang.Long. I'm suggesting that for all ARRAY types, the object be java.sql.ARRAY (implemented by your PhoenixArray class). So the toObject calls for array would always return a java.sql.ARRAY instance, and the toBytes methods would expect to be able to cast the object param to a java.sql.ARRAY.