Use polymorphism instead of switch to create IndexExpressions