Python Closest Point in Pointgrid, How to use resulting point again for Closest Point Loop

Sure, simply make the following changes to the script:

import Rhino.Geometry as rg


def find_closest_points(start_point, point_cloud, max_recs=float("inf"), _depth=0, _path=[]):
    """Recursively searches a point cloud for consecutive closest points.
    
    Args:
      test_point: A point to search from.
      point_cloud: A point cloud to search.
      max_recs: An optional maximum number of recursions.
      _depth: A current recursion depth.
      _path: A current nested list of point pairs.
    
    Returns:
      The nested list of consecutive point pairs.
    """
    if point_cloud.Count > 0:
        pt_cloud = point_cloud.Duplicate()
        closest_idx = pt_cloud.ClosestPoint(start_point)
        closest_pt = rg.Point3d(pt_cloud[closest_idx].X, 
                                pt_cloud[closest_idx].Y, 
                                pt_cloud[closest_idx].Z) 
        _path.append([start_point, closest_pt]) # Change this...
        pt_cloud.RemoveAt(closest_idx)
        if point_cloud.Count > 0 and _depth < max_recs:
            _depth +=1
            return find_closest_points(closest_pt, pt_cloud, max_recs, _depth, _path)
    return _path
    

# Get the start point
start_pt = Points[iStartPoint]
# Create the point cloud
attractor_pts = rg.PointCloud(Points)

# Get the consecutive point pairs
pairs = find_closest_points(start_pt, attractor_pts) # ... and this
print pairs

# Flatten the point pairs list (for the polyline construction)
path = [pair[1] for pair in pairs] # ... and this

# Outputs
a = path # ... and finally this

When flattening the list of point pairs, you may wander why we simply keep the second item from each pair. Well, it has to do with the start point! If the start point is a member of the attractor points, it finds itself as the closest point at the very first recursion.
In the first script, this was great, since the first point to append to the path list was the start point anyway.
However, in pairs script, at the very first recursion, the start point finds itself as its closest point, and thus forms a pair with itself. At the second recursion, it looks for another closest point, but this time, its doppelgänger was already deleted from the point cloud, so it finds another point this time.

Example:
Pairs list:
[[start_point, start_point], [start_point, other_point0], [other_point0, other_point1], … [other_pointX, other_pointY]]
Flat list:
[start_point, other_point0, other_point1, … , other_pointX, other_pointY]

Furthermore, you can also limit the length of the path, by limiting the maximum recursion depth that is currently set to infinity. The maximum recursion depth is mainly a security parameter that you can set to prevent huge numbers of recursions though.