I assume you are going to drill the tank & have your pre-filter inside?
I would suggest having your biomedia compartment in the sump itself .... You have what looks like a 3x3x12 space for your biomedia - a bit small, and with your design <without a water distribution system>, most of the water will go directly from your intake "teeth" down the side & out the box, missing the biomedia. If you are planning bioballs, you'll need something like 1/2 to 1
gal space, plus some way to distribute water over them .... Personally I would find it ugly to have that much stuff inside the display tank.
The upside down U - is that a Durso standpipe you are thinking of? It is not necessary ..... but highly desirable. Unless your water outlet is big enough that the water can flow down the outlet pipe in a sheet <don't know exact size, but from what I read in the neighbourhood of 12" diameter!>, the outflow box will be LOUD. Without a Durso attachment, the water noise in my overflow drove me nuts. The Durso made a HUGH improvment.
Size of return pump - you want 2-4x water turnover per hour for
FW (up to 10x for reef). I add my sump volume to the calculation - unless you have a hugh central sump servicing several tanks. So if your sump is 20
gal, add that to 40
gal of tank makes a flow rate of 120-240
gph. Note that this is actual flow rate - not the max pump flow rate. Moving water uphill & through pipes results in rates much less than advertised. To determine the pump needed, You'll want to first settle on your head height (ie - how high the tank is above your sump), then look through the fine prints on the pump on how much less water it is going to move at that head height, plus allow for 10-20% loss due to tubing resistence.