@Test
	public void testSettingArrayElementAffectsAllElements() throws Exception {
		ArrayDataType dataType = new ArrayDataType(new ByteDataType(), 10, 1);
		listing.createData(addr(0x100), dataType, 0);
		Data data = listing.getDataAt(addr(0x100));

		assertEquals(10, data.getNumComponents());

		for (int i = 0; i < 10; i++) {
			Data comp = data.getComponent(i);
			assertEquals(null, comp.getLong("format"));
		}

		Data component4 = data.getComponent(4);
		component4.setLong("format", 10L);

		for (int i = 0; i < 10; i++) {
			Data comp = data.getComponent(i);
			assertEquals((Long) 10L, comp.getLong("format"));
		}

	}
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/data/ArrayTest.java