Code scheme for arrayed line programming, but collecting for one big scan?

I want to convert the numerical array into a binary array

I think the point you are missing is that a numeric array IS a binary array. Binary is all there is in computing so you don't have to convert it just treat it differently.