TableGen lookup table recipe?

Is it possible to define lookup tables as a list in tablegen, to map one value to another? Here’s the template I was working on:

Oh, I botched my example when I tried to simplify it for the mail list. Presume instead that the foreach loop is 0…4 so that you stay in-bounds on the LUT mapping. You can see how it could be expanded for a larger range, of course.