Replace switched enums with array lookups