OK, at the side is actually easier in many ways as overflow issues are reduced.
Basically you're looking at a glorified HOB enclosure, input can be simple piping that sets up a syphon. If you want static water levels in the main tank then you want some form of surface skimmer. You may be able to take apart some kit you already have for this, but basically it's pipes. Lots of tanks use weirs to achieve this, as it helps stop a drilled tank from draining dry if a pipe cracks, you may be fine with something simpler, basically you need a tube that runs a constant syphon and has an opening at the desired surface level.
May I recommend redundancy with a second syphon tube. A blocked syphon tube overflowing your tank is annoying.
Output is whatever pump you want that returns to the tank any way you like. I've used externals and dedicated pumps for this. Depends what flow rate you want really.
After that it's whatever compartments you want in there. Sumps are generally set up with baffles that force the water to flow through various chambers and allow static water levels in some (good for things like skimmers). Other sumps are simply large water chambers for volume or filter media. This is where it gets creative and personal, which is why you see pictures of peoples plans all over the place.