Blocks linear array index

I have this blocks that are the result of two linear arrays. I want their point list to be in this order (picture below), however, they are not like this now. Could you please help me with my problem?
Thank you all,

blocks (53.9 KB)

Sometimes, like this case, Path Mapperis quite useful.

blocks (63.9 KB)

Thank you. It was really helpful.