Since you didn’t upload the gh file, and since I do not know those grid components you’re using, this will necessarily be a somewhat general answer.
Components like [Polyline] or [Interpolate Curve] operate on lists of points and they output individual curves. This is of course what you need since it’s no good fitting a curve through single points, or indeed fitting a single curve through all the points in a specific datatree. You want to be able to create many different curves based on some complicated point data structure using just a single component.
So working back from that, you need to figure out how to supply your points to the [Interpolate Curve] component in such a way that all the points that define a single curve are all in the same list, and all the points that are supposed to end up on different curves are all in different lists.
Using the standard Grasshopper grid components (not the ones you’re using, but I’m assuming they work in a similar fashion), the output of a single [Square Grid] is a bunch of points, organised in the separate columns of the grid. So, assuming a 5x7 grid, you’d end up with a datatree containing 5 separate list, and each list containing 7 different points. This will look something like:
{0;0} (N = 7)
{0;1} (N = 7)
{0;2} (N = 7)
{0;3} (N = 7)
{0;4} (N = 7)
(Actual amount of zeroes in paths may differ). If you were to connect this output to the [Interpolate Curve] component, you’d end up with 5 different curves, each one connecting the 7 points in the associated list.
If you wanted to have your curves connect all points in a row-like fashion rather than a column-like fashion, you’ll have to modify the data tree to look like this instead:
{0;0} (N = 5)
{0;1} (N = 5)
{0;2} (N = 5)
{0;3} (N = 5)
{0;4} (N = 5)
{0;5} (N = 5)
{0;6} (N = 5)
This can be achieved using a [Flip Matrix] component, or using a custom mapping pattern and the [Path Mapper] object.
You seem to have two grids (one positioned some distance above the other) and you somehow want to create connecting curves through both. I do not know how you want them to be connected, you only posted an image of what you have now, not what you’re after. Assuming you want your curves to connect points from both grids, further data tree manipulation will be required.
Can you upload a sketch of the connections you need?