BinarySearchTreeParentArray from Permutation
The binary search tree of σ as its parent array: entry v is the value v is inserted under, 0 for the root.
A search tree's values are its in-order labels, so this is the tree's in-order parent array. See bst.ts for why a fold builds it this way.
Called as CombinatorialMap(x, "BinarySearchTreeParentArray"). The head's page has its examples.