I keep my drivers/ratchets/breaker bars in the narrow top drawer next to my wider socket drawer. I had previously used foam, but found it a pain to keep up with if I got a new tool and had to cut out a new space or re-arrange a drawer. It was also a less efficient use of the limited drawer space I had.
So I used aluminum angle to create dividers and separate them by drive size. 1/4" on the left, 3/8" in the middle, 1/2" on the right. Because the top drawers of my tool chest are deeper, I had enough room to mount a little slide-out tray that sits above the ratchets. Made from aluminum angle, it holds all my extensions organized by drive size and type. The tray sits far enough back and high enough out of the way that it doesn't get in the way of pulling out any of the ratchets or breaker bars, and can also be easily taken out of the drawer if needed.
It keeps my tools organized enough that it's quick to grab what I want while maximizing the space of the drawer.