Let $U_{n_1,\ldots,n_k}(n)$ for $0\le n \le \frac{(n_1+n_2+\cdots)!}{n_1!n_2!\cdots}$ be the function that produces the $n$th unique-permutation using integers $(0,\ldots,k-1)$, in lexical order. For example, $$[U_{1,2}(0),U_{1,2}(1),U_{1,2}(2)]=[(0,1,1),(1,0,1),(1,1,0)]$$ and $$[U_{2,2}(0),U_{2,2}(1),U_{2,2}(2),U_{2,2}(3),U_{2,2}(4),U_{2,2}(5)]=[(0,0,1,1),(0,1,0,1),(0,1,1,0),(1,0,0,1),(1,0,1,0),(1,1,0,0)]$$
It is clear that any permutation of the elements in $U_*(n)$ results in another element in that same set. But what is the pattern of their movement? For example, suppose we focus on $(2,2)$, and list out all $4!$ permutations in lexical order, $$P = [(0,1,2,3),(0,1,3,2),\cdots,(3,2,0,1),(3,2,1,0)]$$ and then apply each of the permutations to the elements in $U$ we get a re-ordering of the elements in $U_{2,2}$. For simplicity, let $$U_{2,2}(n) = [0,1,2,3,4,5]$$
then the table generated by applying every permutation looks like:
U_(2,2)(n) Permutations
0 -> 0 0 1 2 1 2 0 0 1 2 1 2 3 4 3 4 5 5 3 4 3 4 5 5
1 -> 1 2 0 0 2 1 3 4 3 4 5 5 0 0 1 2 1 2 4 3 5 5 3 4
2 -> 2 1 2 1 0 0 4 3 5 5 3 4 4 3 5 5 3 4 0 0 1 2 1 2
3 -> 3 4 3 4 5 5 1 2 0 0 2 1 1 2 0 0 2 1 5 5 4 3 4 3
4 -> 4 3 5 5 3 4 2 1 2 1 0 0 5 5 4 3 4 3 1 2 0 0 2 1
5 -> 5 5 4 3 4 3 5 5 4 3 4 3 2 1 2 1 0 0 2 1 2 1 0 0
My hope is that a sufficient formula exists that can answer an arbitrary question. For example, what is the index for the second permutation where $U_{57,138}(20)$ maps to $U_{57,138}(21)$? Can you give me a formula for all the $m$'s where $P_m(U_{57,138}(30))=2$?