This (general case) is a concave hull task (not convex). Given a planar pts List a concave hull is this:
But if you can optain the right mesh out of your collection (this could be quite tricky mind) then the naked edges (i.e. mesh face edges that are connected to a single face) are the segments of the polyline that you are after: use the join Curves component on them (or use the MShadow against a suitable plane).
Plus if your collection is exactly as shown (i.e portions of a rectangular grid) then you can get what you want by excluding faces (on a Delauney mesh) that have edges greater than the diagonal length OR using other ways without a mesh … but I’m not sure how to achieve this without code (but that is a personal opinion).
Anyway: see attached that is the fastest way to cut the mustard - via a del mesh - on that matter … but is pure C# code (the bad news).
Points_ConcaveHullViaDelMesh.gh (341.9 KB)
Note: you are responsible for entering the right L - the diagonal distance (if not > bananas on sight).
Note: this works on rectangular grids.