Reconciling arrays

I figured out how to do it.

If the original dataset is dataset A, then first reconcile dataset A. Next split each array from dataset A into new datasets B1, B2, ..., Bn. Where each dataset Bx has an array of ids from dataset A, to keep track of all entities in A that should have the entity Bx in an array. Then deduplicate and reconcile each dataset B1,...,Bn and finally merge data reconciled datasets back into arrays in dataset A.