ah shoot, I realized I didn't put [proposal] in the header so I deleted this and then added more stuff including a use case.
To summarize, let's say you want to make Conway's game of life. There are many ways of doing it, but I did it by chunking each row into windows of size 3 and then doing various operations. The problem is, that the first and last windows should have a size of 2, as the first cell in a row only has a neighbor ahead of it (we can also make stuff wrap around, using this proposed chunk_every function, but ill explain that part later). So I wrote this setup_arr function that makes an incomplete window, pads it, and pads the incomplete window at the end of the chunks.
Example:
[0,1,0,1,0,0]
would turn into:
[0,1], [0,1,0] [1,0,1], [0,1,0], [1,0,0], [0,0]
But with the leftover options, we could also add 0s (as the neighbor that doesn't exist isn't alive)
[0,0,1], [0,1,0] [1,0,1], [0,1,0], [1,0,0], [0,0,0]