@golemwire Imagine a stiff, flexible sheet of paper with holes punched out in the shape of the pattern of hooks you want to engage in each row of knitting. Similar in principle to (and inspired by) a classic Jacquard loom.
You can even clip the bottom of a card to the top to program an infinite loop or chain different cards together. I'll definitely share pics when I level up enough to try it, but a search for "knitting machine punch card" should turn up some videos.