Jelly, 2 bytes
ŒṪ
Try it online!
1-indexed, but the footer converts to 0-indexed.
Less built-in:
Jelly, 3 bytes
œẹ1
Try it online!
œẹ All multidimensional indices of
1 one.
...
Brachylog, 8 bytes
pᵐ≠{b|}ᵛ
Try it online!
Since it takes $5!*5! = 14400$ tries to determine that the first test case gives false, I've added some shorter ones...
pᵐ Permute each ele...
Jelly, 13 bytes
50R>×ɗị⁾-|Ø[j
Try it online!
Full program only--insofar as supporting the input requirements is concerned. Jelly implicitly Python evals the arguments to every program, so s...
Jelly, 1 byte
ḅ
Try it online!
Essentially just Razetime's APL answer, except in that ḅ vectorizes rather than carrying out mixed base conversion--irrelevant if, as is the case here, the provi...
Jelly, 9 bytes
Rȧ_@Rп@L
Try it online!
Takes $t_1$ on the left and $t_2$ on the right. R}ȧ_@RпL works given the arguments in the opposite order.
R Ascending range from 1 to t_1 (...