When you're arranging a group portrait, the first thing you'll probably consider is height, putting taller people at the back and shorter people at the front.
However, keep a close eye on clothing too. It's easy to miss clashing colors while you're focusing on everyone's height, and that will be more noticeable in the final picture.
To ensure everyone appears sharp, you need to use an aperture of at least f/8 with a wide-angle lens. But if you're taking an indoor group portrait, you'll need to use a high ISO in order to shoot at that aperture and get sharp handheld photos.
Photos may end up full of noise, and even then the shutter speed may not be fast enough for sharp images. A trick here is to arrange everyone in a line along the same focal plane, then the aperture doesn't have to be so narrow.