hook this command up to a redstone clock 2 block(defult) under a dispenser,chest or double chest to constantly fill it its that simple
*Note name and item: s to open it
*Editing
1:change the "s" after the colon to change the lock
2:change the number after the slot colon to alter which slot (google to find which slot is which)
3:change the arrow with the item
4:change the 64 for the number in the block
5: alter the coordinates to suit your needs