generic indexing codes for strided views