BTW I'm not too familiar with Objective-C and I'm wondering why do updateAlertConditionForNearbyEntities() and loseTargetStatus() make a local copy of uni_entities?
Looking at it, it might be that there is one local copy too many (edit after looking some more - I think it's correct as-is). However, note that the code you see here is the result of more than eight years of revisions and at least one of the two cases you mention was located in the HeadUpDisplay class in the past and was transferred over to PlayerEntity at some point. Back then, there could be indeed a very valid reason for doing it this way, which may or may not be applicable now. In fact, there is a comment in the old HeadUpDisplay code (rev. 3f091ec), just when it is about to set the uni_entities, saying: "// use a non-mutable copy so this can't be changed under us." so that must have been the reason back then and the code survived in this form until now.