Your question is a little confusing.
You always overflow to a sump (unless you are putting the sump above the tank).
With a sump, water flows to it by gravity, so you only need to pump water from the sump to the tank (never out of tank to sump)
Over flows can be from the side, the back, even the front, and overflow bees can be placed anywhere.
I have had some sumps right next to the tank, But in that case always have it placed slightly lower than the tank to use gravity, here is an example where a tall tank uses a shorter tank abutting it for a sump, the tall tank is 24" tall, the shorter one is 12" tall.

as you can see, an overflow box hangs on the tall tank, and is wedged and sits on the edge of the shorter tank. The pump sits in the shorter tank, and pumps water back to the taller one.