Video conference style grid layout

Hello. I’m trying to recreate a video conference layout (think Zoom/Google Meet): a black 16:9 screen which contains a grid of smaller individual 16:9 rectangles, one for each participant, something like this:

https://img2.thelist.com/img/gallery/zoom-fatigue-the-reason-youre-so-tired-after-video-calls/zoom-calls-require-us-to-be-present-the-whole-time-1587749206.jpg

The grid needs to behave dynamically so that as each participant enters or leaves, the grid layout adapts to the new number (anything from 1-25), filling the width of the screen accordingly and centering. Each participant will simply be a rectangle with animated colour and noise, a repeatable instance that can be fed colour values etc., but not a video or stream of any kind.

Can anyone suggest the best method to achieve this, please? Thanks in advance!