Add generic indexEnd() method