private void encodeArray(Encoder encoder, Array type, int size) throws IOException {
		if (type.isZeroLength()) {
			// TODO: Zero-element arrays not yet supported
			encodeOpaqueDataType(encoder, type, size);
			return;
		}
		encoder.openElement(ELEM_TYPE);
		encoder.writeString(ATTRIB_NAME, "");
		int sz = type.getLength();
		if (sz == 0) {
			sz = size;
		}
		encoder.writeString(ATTRIB_METATYPE, "array");
		encoder.writeSignedInteger(ATTRIB_SIZE, sz);
		encoder.writeSignedInteger(ATTRIB_ARRAYSIZE, type.getNumElements());
		encodeTypeRef(encoder, type.getDataType(), type.getElementLength());
		encoder.closeElement(ELEM_TYPE);
	}
Encode an Array data-type to stream.
@param encoder is the stream encoder
@param type is the Array data-type
@param size if non-zero, is the size of the data-type in context
@throws IOException for errors in the underlying stream
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode/PcodeDataTypeManager.java