It's best to get a micro ATX or ITX board and for the CPU to sit near the peripheral plug-ins.
Doesn't matter where the memory sits because you can always buy a adapter that makes the memory sit sideways. Then measure twice drill and cut for mounts and for the peripheral plug-ins to be accessible.
To live is to let die