private static DataType getSettingsBaseType(DataType dt) {
		while (true) {
			if (dt instanceof TypeDef) {
				DataType baseDt = ((TypeDef) dt).getBaseDataType();
				if (baseDt instanceof Array) {
					dt = baseDt;
				}
				else {
					break;
				}
			}
			else if (dt instanceof Array) {
				dt = ((Array) dt).getDataType();
			}
			else {
				break;
			}
		}
		return dt;
	}
Get base datatype associated with any array (include typedef of array)
@param dt datatype
@return base array datatype or specified dt if not an array type
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/data/DataTypeSettingsDialog.java