1D monochrome Link-a-Pix solvability
JavaScript (ES6), 41 bytes
Returns false for valid or true for invalid.

a=&gt;a.some(p=(x,i)=&gt;--p&gt;0?x:a[i+x-1]^=p=x)

Try it online!
Commented
a =&gt;            // a[] = input
a.some(p =      // start with p NaN'ish
  (x, i) =&gt;     // for each value x at position i in a[]:
  --p &gt; 0 ?     //   decrement p; if it's positive:
    x           //     make sure that we have x = 0
                //     (because we're currently over a connection 'line')
  :             //   else:
    a[          //     XOR the entry at ...
      i + x - 1 //     ... i + x - 1 ...
    ]           //
    ^= p = x    //     ... with x; and set p = x
                //     this must give 0 if the puzzle is valid
)               // end of some()

The trickiest case is when a \$0\$ is reached at position \$i\$ and we're currently outside a connection (i.e. \$p\le0\$), which causes the entry at \$i-1\$ to be XOR'ed with \$0\$. If the puzzle is valid, this will always result in \$0\$ as expected because:

if \$i=0\$, we do undefined ^ 0
if \$i&gt;0\$, the entry at \$i-1\$ either was already set to \$0\$ or was cleared by the previous XOR