An array record's hash is one per field type in a document (every
array the base game's files hold follows this, and each such hash is a
key of the document's reflection group table, now read). A new array
takes the hash of an existing array of the same holding type and field;
callers can ask the writer to refuse when there is none, and the mod
merge keeps the old fallback. Checked on the game's own
level documents.
Each array record carries a hash the original files make specific to
the field or element type; the writer used to give every array the hash
of the first record of the same element type, so a rewrite changed
hundreds of them in bam's level root. Arrays read from a document now
keep their record's hash; only arrays with no source record borrow as
before.
A rewrite copied a boxed value's bytes, pointers and all, but wrote the
arrays and strings those pointers reach only when a field also reached
them. Rewritten documents lost that data and the boxed pointers aimed
at whatever moved into its place; the mod merge rewrites real documents
this way. Read documents now keep their EBXD bytes, and the writer
carries every array, string, instance and boxed value a boxed pointer
reaches, repointed. Found by a round-trip check on bam's level root (one string and
about 1,120 bytes of arrays lost).