Write a function to traverse a binary tree in preorder, inorder, and postorder.
Use the signature def traverse_tree(root):. For grading, represent each node as [value, left_subtree, right_subtree], where a subtree is another nested list or None. Return a dictionary with keys preorder, inorder, and postorder, each containing a list of visited values. Preserve duplicate values and return empty lists when root is None.
def traverse_tree(root):