utils/allNodes recurse into nested lists

This changes `utils/allNodes` to recurse into nested lists/arrays. This should allow greater flexibility when specifying the nodes. It also adds test coverage for `utils/allNodes`.