Sorting list of lines of equal lengths

I am trying to loft a bunch of lines but only to loft the lines on the same horizontal plane to loft, anyone got any pointers?

Group the lines by their Z-position Create SetMember IndexList Item

If you want more detailed help, upload a grasshopper file.

-Kevin