Let's say I have a rectangular plane:
How to subdivide it in one direction, like I'm adding loop cuts:
My goal is to make something like this at the end, there each face is extruded up and flattened by Z axis:
So this plane is a part of a complex shape, I can't just replace it by Mesh Grid primitive:
Thanks to @quellenform I created a solution based on his answer. Here is the final solution, for unlimited number of planes:








