I've been playing around with circuits and such, and trying to apply what tutorials say online for sorters, but i don't want to sort, just want to fill all the boxes against a wall. The thing I want to have a minecart and hoper fill the box on the left, but when i take from the last box on the right, i want to fill up from the box next to it. So i only have to reach from the closest box, and mine cart only has to fill the furthest away box.
I expect to use hoppers, droppers, red stone, comparators, you name it, but like i tried to stagger them and lock the hopper, but it wasn't working as expected.
Under the first box put hopper feeding dropper under next box then repeat across. Drive the droppers with a clock circuit.
Realize that in this and also in the vertical stacked boxes after the last box fills then the hopper fills then next to last box and so on. This means that all of your items are not in the boxes but when something is removed they will always fill forward.
I see you want to fill from the left and remove from the right so reverse what I show. Will work as you want and all items will keep moving to right as you remove items from the last box