Make array lookups constant time
Use simplified invariant time lookup function