Would adding a function to std (on slices or arrays) that transforms a
&mut of the whole to individual
&mut of the parts?
I think it would require const generics because it probably has to return an owned array.
This should help with the problem of not being able to mutably borrow two different elements from an array since you can non-mutably borrow this result (but I believe it is still safe to do so because there is a mutable borrow tracking the lifetime of the second type).