Working on FETools::extrapolate in parallel

The FETools::extrapolate function does not work in parallel, because there can be patches with childs of childs ... which are artificial, but interpolation on a patch needs dof values of this cell. The idea is, to store the dof values needed to a list, send the data around to all processes and do the interpolation patch-wise.
All functionality is implemented in a struct CellDataHelpers, so the code is a bit more readable, hopefully, but this is work in progress, maybe some parts, for example sending data around, can be done more efficient and more elegant. If someone has an idea, great!!
I have this list of cells with dof values distributed over all the processes, I want to collect all data at process 0 and then broadcast again, the point is, I do not know, on which process I really have values, so I send all values to process 0, check if they are different from zero and store. I don't know how to do this more efficiently without storing more data.