Check out the attached code. I had a look at your example, it won't work and it's not just due to the drop to zero (which can be fixed by wiring the value from the left shift register terminal to the false of the select function, not 0).
From the example it looks like you want to process the first row of a 2D matrix so I made code that will do just that. There's a number of ways to do this. In my example I've shown to different methods; one that works with the row as a whole array (produces very simple code and the fastest one here with the array sizes involved) and one that check element by element.
On my computer doing the test for an array of 10000 elements takes 0,2ms with the whole array method and 0,5ms with the element method.