It can sometimes be helpful, but yes, copy overhead can become a problem, especially if you're storing object types (since a copy then becomes "increment 9 reference counts").
You can always try to implement your own copy-on-write fixed-size collection using ManagedBuffer.
I believe this class allows you to access the same optimisations as most of the Swift native collections use. It is widely used by the swift-collections repo (for example).
I’m a bit torn. As far as I know, heap allocations are not without their overhead. Maybe I should just profile and stop optimizing blindly, but I’m still trying to learn how to properly test and profile in Xcode.
A collection designed around ManagedBuffer alongside with isKnownUniquelyReferenced should be able to avoid heap allocation in certain scenarios. I can't provide you more details on that.
I certainly agree, that learning about profiling is super useful! Especially, if you want to verify, that your optimisations are effective.
Definitely measure and profile first. Swift performance can be tricky to understand even with data, it's going to be nigh-impossible if you're just guessing.