@Override
	public boolean isDuplicateAllowed() {

		if (!isSingleRowSelection() || this.getNumSelectedComponentRows() != 1) {
			return false;
		}

		// set actions based on number of items selected
		int rowIndex = getRow();
		DataTypeComponent comp = getComponent(rowIndex);
		if (comp == null) {
			return false;
		}
		if (viewComposite.isPackingEnabled() || isAtEnd(rowIndex)) {
			return true;
		}
		DataType dt = comp.getDataType();
		if (dt.equals(DataType.DEFAULT) || dt.isZeroLength()) {
			return true; // Insert an undefined and push everything down.
		}
		if (comp.isBitFieldComponent()) {
			return false; // unable to place non-packed bitfield in a reasonable fashion
		}

		// Get the size of the data type at this index and the number of
		// undefined bytes following it.
		int dtSize = dt.getLength();
		if (dtSize <= 0) {
			dtSize = comp.getLength();
		}
		if (dtSize <= getNumUndefinedBytesAfter(comp)) {
			return true;
		}
		return false;
	}
Returns whether or not the selection
is allowed to be changed into an array.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/StructureEditorModel.java