Passing spline vertex property into graph to add or remove it from list
I am assuming you don't want to use a bit mask list in the node tree and instead want to use a native spline attribute accessible from the UI. I don't think Blender allows custom attributes for splines, see this and this. So I think your only option is to utilize the Weight or the Radius of the handles to determine their state. For instance, you can get the weights of the handles using the following expression:

[point.weight_softbody for point in obj.data.splines[0].bezier_points]


Then you check if the weight is larger than 0.5 by adjusting the expression to be:

[point.weight_softbody &gt; 0.5 for point in obj.data.splines[0].bezier_points]


Now, simply use the output boolean list as the mask for your handles using the Mask List node. To include a point, increase the weight more than 0.5. Alternatively, you can use the radius if you are not utilizing it somehow.