modified local_subtensor_make_vector to support advanced indexing