Pragmatic groups and routes

I have a nested array that represents a sites hierarchy / pages.
Naively, I though I could walk this array… and call $app->group() to “open” a group and then $app->any() to add groups or routes to the current group… then perhaps some sort of groupEnd() or popGroup() to close the group while walking the array… However it appears that $app->group() requires a closure param from which route are added to the group…

Question 1: Is it possible to dynamically / pragmatically create groups?.

Question 2: Slim has the routerCacheFile option… is it possible to “skip right to the cachefile” and not even call $app->get(), $app->any(), etc?

Question 3: Best practice for pragmatically generating a site-map ?

Seems like I’ll need to define routes and define a site-hierarchy separately…