First, you might want to message the mods and have them move this thread out of the chemistry forum and into the aquascape forum.
From personal experience, I would make sure you leave room for your magnet cleaner at least on the sides and front.
I don't worry about cleaning the back glass below the rock-line, so I'd say put rock as close to that glass as you want, unless you plan to clean the back glass.
For flow behind the rocks in the back, I have a split loc-line return and one of the nozzles points to that area.
Regarding adhering rocks to the glass... If the rocks will be sitting on the bottom and supported somewhat even before you glue/attach them, you can get away with a lot more weight. Otherwise, I wouldn't "hang" anything very heavy in case it does fall off - you don't want a cracked tank bottom.
They do sell magnetic "rocks" you can attach to the glass, and you can also build a "rock wall" insert using egg crate, pond foam, and rubble rock.