private byte[] nlistToArray(NList nlist, int stringIndex) {
		byte[] ret = new byte[nlist.getSize()];
		DataConverter conv = DataConverter.getInstance(!machoHeader.isLittleEndian());
		conv.putInt(ret, 0, stringIndex);
		ret[4] = nlist.getType();
		ret[5] = nlist.getSection();
		conv.putShort(ret, 6, nlist.getDescription());
		if (nlist.is32bit()) {
			conv.putInt(ret, 8, (int) nlist.getValue());
		}
		else {
			conv.putLong(ret, 8, nlist.getValue());
		}
		return ret;
	}
Converts the given {@link NList} to a byte array.  The given {@link NList}'s string
index field will be replaced with the given string index parameter.

@param nlist The {@link NList} to convert
@param stringIndex The new string index
@return A new {@link NList} in byte array form
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/ios/ExtractedMacho.java