If you are able to fetch siblings of current page, then same logic you can use for other pages as well as you already have a path. You can use ResourceResolver to get Page resource and use same logic.
resourceResolver.getResource(PAGE_PATH).adaptTo(Page.class);
To get siblings, you can just get Pare...