Convert std::vec::raw::{init_elem, copy_memory} to methods, and remove aliasing &[] and &mut[]

The removal of the aliasing &mut[] and &[] from `shift_opt` also comes with its simplification.