Generalized indexing in slice