Whats the best concept to implement client update ranges?

The problem is: some values like the "health" or movement state need to be send as soon as an npc enters the players update range. After that, the values only need to be send if they have changed. I can only think of two ways, both have a large impact on memory usage for games with many players/npcs.

1. Every npc function stores an array that holds a boolean for every player which determains if this entity has been in his update range in the last frame (or last update).

Problem is: If the server could possibly support 500 players max at the same time, every npc (lets say there are 1000 of them) needs to have a really big array. Also, a lot of memory goes to waste because there will hardly always be 500 players online at the same time.

2. Every player function stores an array of all npcs that contains if they have been in the players range in the last frame.

Problem: You'd have to set a maximum of npcs per level, and you'd have some ugly code for setting and reading the array from the npcs functions.

Are there other ways which I haven't thought off? how is the anet template doing it?