It depends. I would say that it should go at Sources/MessageIndex.php. You get the list of topics per page (already exists), then perform the query to load the "seen/not seen" thing from all topics at once, then stuff the result in $context['topics'] again. That gives you that information in the list of topics (MessageIndex).
If you also want it in topic view, then you need to do it again in Display.php.
I still don't fully understand what you want to do with this information, though