Let us say you keep DataCollection immutable. Immutable means you can not change any of its fields, but there’s a catch:
Vector is a mutable container, allocated on the heap: What is immutable in DataCollection is the pointer to where on the heap the content of the Vector is stored. The catch is you can overwrite all or part of the data in that Vector, on the heap.
A shallow copy of a DataCollection duplicates this pointer. Overwriting dc1.structure[w] = Single(...) will affect dc1 and dc2.
You are OK with that? copy. Not OK? deepcopy, in which case the vector on the heap is copied to a distinct vector on the heap.