tests/trie: loop over the words in an array instead of enumerating each individually