Create a new method like PDataType.fromSqlElementTypeName(typeName), since you know you're creating an ARRAY. In that method, first look up the primitive type using the typeName. Then from the primitive type name, get the typeId. Then just add this typeID to the sqlTypeID of an ARRAY (which is 1000). Then you can use this to lookup the PDataType for that type of array using PDataType.fromSqlType (which we may want to rename to PDataType.fromTypeId()).