writeArray method
Writes items sequentially into the memory referenced by this pointer.
The number of items written must not exceed the allocated struct array capacity.
Implementation
void writeArray(List<D> items) {
for (var i = 0; i < items.length; i++) {
_copyOrWrite(ptr.offsetBy(i * structType.layout.byteSize), items[i]);
}
}