Maybe I'm missing something, but if you "would change the point count of the line", this wouldn't affect the vertex order, and so it wouldn't affect the indices on the line? Seems irrelevant to the problem, then. As for specifying some arbitrary input, you could use a string, except in Blender 3.0 you can't use Index to control String Slice, as the parameters are supposed to be constant:

However, you can use an integer input:


Homework
Since an integer $005$ is the same as integer $5$, in order to see leading zeroes, you need to start each number with $1$ and ignore first index.
Since it's not chad Python integer without length limit, but instead virgin C++ signed integer with range $-2147483648..2147483647$, You can only get get 10 digits, however, due to a conversion to float it gets worse: Blender uses float32, which after reaching $2^{24} = 16777216$ drops its precision and rounds to increments of $2$:
>>> import numpy as np
>>> np.float32(111111111)
111111110.0
Since $100000000 > 16777216$, the last digit can no longer be odd like $1$, therefore the maximum number of digits is $8$, and due to necessity of adding $1$ in front, only $7$ digits will carry data. This just can't be. Solve this by changing the base to $2$, you can use something like Windows calculator in programmer's mode, or type in Python console 0b
in front of the binary number, to see what's the base 10 integer for it, or use a custom string property and a driver like this:

Homework done by Gorgious
It sounds condescending so let me clarify he figured it out independently and had a smarter approach of just comparing powers (kind of like comparing password hashes) rather than reversing the powers (logarithm). His setup works for any base so I modified it for base 2:

Now you can use a driver like so:
int("111011011001"[::-1],base=2)

>>> bin(16777216)
'0b1000000000000000000000000'
There's 24 zeroes, which means you can store up to 24 booleans this way.
Using another geometry
You could simply create a plane, remove an edge (with verts), subdivide the other edge (you could subdivide it more than needed), enable MeasureIt addon and show the debug overlay with vertex indices, Mesh > Sort Elements > View X Axis, select vertices, zoom in at the beginning and just select the vertices you want to enable and raise them up from Z=0 to anything else:


Use increment snapping to easily return vertices to 0. Use a Python script to import data from external source by assigning coordinates to vertices.
Parsing a string
Just found a way to parse a comma/space separated list and wrote an answer here:
Geometry Nodes - Extrude edge by ID