I’m not 100% sure of the context (can you post your code?) but I think you should be able to treat subcategories the same as parent categories.
So category.latestTopic would work the same for any category/subcategory. If you loop through each of the subcategories using category.subcategories you should be able to use category.latestTopic within that loop.