In most situations, you use persistent data structures where you only have to copy the modified leaves.
If you really need your type to be backed by a contiguous block of memory, you batch updates (stencils, SIMD, etc.)
If you really need your type to be backed by a contiguous block of memory, you batch updates (stencils, SIMD, etc.)