I just wish there's an easier way to do it. My proposal is either:
1. List the names of all who have max affinity somewhere.
Drawback: the engine simulates affinity decay; affinity decreases overtime when not interacted, or if certain actions performed on the npc. This means the list is dynamic and need to be constantly updated, not to mention how to sync it with the savegame.
2. Make Arisen Bond work like it's intended to be
Drawback: without access to the engine source, making it work means keeping the receiver affinity to max, all other lowered, at least to friend status (score 850). This however means the mod has to iterate over ALL npc in the game to lower the affinity. This can make the engine slow down to a crawl, if not crashing it outright. Also, if all other npc affinity is lowered outright, it'll break the immersion of NG+. So only those with max affinity should be lowered.
Suggestion: cache npcs with max affinity. But this is essentially what proposal #1 suggests.
Hope someone somewhere solve this