In terms of the location, one possibility is to precompute the map in setup(), at the same time the choices are extracted.  Could then just look them up, or even return the entire map without regard to particular choices needed.