I managed to work out the generalized matrix logic for arbitrary layers of parents, where each parent can pick children from not only the layer immediately below, but any layers below. I have it fully working in a test window - now to integrate it into my parametrization framework...