The simplest way is to build a for loop with a case structure that examines each element. If the element is not zero, it adds it to an array being built using Build Array or Insert into Array and a shift register. If it is zero, it is not put into the array.
___________________
Try to take over the world!