I read about copy-on-write implementation for Array in Swift here.
Arrays, like all variable-size collections in the standard library, use copy-on-wri
Copy-on write is supported for String and all collection types - Array, Dictionary and Set.
String
Array
Dictionary
Set
Besides that, compiler is free to optimize any struct access and effectively give you copy-on-write semantics, but it is not guaranteed.