Make `as_strided_copy` materialize a new tensor with `index`. (#6624)
Fix: #5835
This PR implements arbitrary as_strided function by decomposing it into slicing+indexing. In summary, we slice the base tensor for complying with the given storage_offset, and then index a flattened version of the tensor, gathering the desired elements, based on the given size and strides. (more explanation in the code).
cc @miladm @JackCaoG @lezcano