I'm using Cataloger to display images and each image (page) needs to have list of similar images (pages). I've solved this by adding a field where I can store a comma separated list of menutexts (ie. pages which I want to be added). And no, alias is not an option this time

Now I need to turn this list for example (page1,page334, page2) to a list of links. Menu manager would be great, but I have not figured a way (without changing core) to add extra parameters to menu manager, and after this I'd have to use smarty to do a check if current page is in this comma separated list (which doesn't sound easy to do in smarty).
It's trivial to pass a parameter to UDT and php can handle arrays but I haven't figured out how to receive all children, grandchildren ect. of a given page. I'm not even sure if it is possible without some crazy while loop.
So I thought about doing a sql query manually "...HAVING menutext IN('page1,page334, page2')" which has only one pitfall. My pages are divided in sections each having same menutexts and I need only ones that are in the same tree as page that is viewed. There is of course an option to get all of these pages and manually do some 'find first parent' code to each of them, but that sounds very inefficient. Is it?
Any ideas welcomed!