If your keys are simple arrays, a trie is probably a good option because it avoids the usual inefficiency of a sorted tree for complex keys. When keys are more than that, it starts getting tricky
Also, footnote to the first point in the first thread above: obviously hash/random ordering is okay if you’re sure the nondeterminism will never affect the program’s output, but my own experience is that such cases are actually quite rare