Storing a number of the order of magnitude of n! will take the same amount of memory than storing a permutation of n elements, so what's the point ?
In other words, good old Fisher Yates, storing the resulting permutation, and a simple lookup is probably the way to go.