Side channel safe array lookup.