Project individual curves onto separate planes along Z axis

Hello everyone,
I need some help to solve this:

I have a 2D array of curves, some of which share their Z axis with a plane.
When this condition is met, I want each one of these curves to be projected separately onto the plane they share the same Z axis with.

Thanks in advance for the help!

Additional info will help get this answered quicker.

Please see the recommendations on how you can help us help you.