5 gallon may be to small, the return pump would take up most of the space in it. if you want to go that small then do an above tank or a hang on the back one. now, i know you emphisized beneath but liek i said a return pump would take up around a quarter of the fuge, makign it pointless to have, you could go with atleast a 10g if you go beneath
as far as what they do they are a refuge for critters and micro algae that will get eaten or will take over your main display tank. they are also used as a means of filtration, when cuppled with chaetomorpha and a deep sand bed