Here's the circuit board that controls a computerized machine - one whose stitches are controlled by this array.
This is how Computerized machines are controlled.
An "electronic" machine is one with a few electronic FEATURES, and there are a lot of mechanicals with a few electronic features - the foot pedal being the most common, and auto buttonhole, needle up/down etc. There is a small circuit board or two for a few special features, but the stitches are produced with mechanical cams built into the machine, and some machines even have cams available to insert into a place on the machine for special stitches. This is a simplistic overview of the differences.
An all mechanical machine has no circuitry and also uses built in and/or added cams. So a mechanical machine can be electronic or not, but a computerized machine is all circuit boards connected to step motors that control the various innards of the machine.
Here is a camstack which controls the stitches on a mechanical Pfaff. Most mechanicals have a similar internal cam stack, and they could be larger or smaller with less stitches. The cams move into place as you turn the external dial or push an external button, and control the needle bar which gives you your stitch of choice.