examples: tree_to_array.py speedup (use fewer entries)