Implement range handling for square bracket references