The corporate identity of my company defines the table of content in presentations as equally sized shaped boxes so that 5 of them fit in a row even if there are less, and more go into the next line. The section titles should word wrap inside this boxes as sown in the picture:

At most 3 rows limiting to 15 sections need to be supported.
I would be able to create this manually for each presentation using {tikz} but unfortunately I have no clue how to approach a TOC template to get this automatically from \section entries.
It would be acceptable if "unused" boxes would be rendered as empty boxes with gray background limiting the TOC to 15 entries in total.
Any ideas?
