Something that I use in C/C++ is to have a number of threads writing out to the same array. They accomplish that by using a single atomic counter to bump a count of the number of items they want to write out.
I wonder if there is a way to do this in Rust in a safe manner? I could of course let the threads write our to different arrays and then merge them once all the threads are done but the would add extra overhead because of memcpy:ing of data on a single thread.
Here's something I threw together that might be what you want. Note that it does depend on an unstable feature in order to "unwrap" the Arc; you could get around this with an extra unsafe method that swapped the inner slice out.
Edit: I should also make clear that I don't really understand the implications of the various ordering modes, so I've gone for what I believe to be the most conservative.
Edit 2: Oh, and you should be able to extend this with a push_all or extend, by just bumping the offset by more than 1.
(Incidentally, the chunks_mut method, returning an iterator, is a nicer way to call split_at_mut in a loop to get views into the entirety of an array (if you're splitting with the same length each time).)