This is for a learning experience,
Ok. I figured.
The below is the logic you need to do. One thing you may notice is that the think hook is added inside the check setup function, not outside the check setup.
There are many other ways to check this of course, but since you want to use the think, I've used it.
Player join, afksetup
In afksetup, set variable 'old angle', attach it to player using a unique identifier. (Steamid, or uniqueid). (ply.<unique>_afk_angle)
In afksetup, create the function, UNIQUELY named, Think will use to check.
In afksetup,(not outside the setup function like you have now), add a hook Think, named the same unique identifier you used to attach to player previously for easier stopping/tracking later.
end afksetup
Player quit, afkcheckkill
In afkcheckkill, use hook remove to kill the player's previous unique named think statement.
end afkcheckkill
Now, that will indeed create a think statement for every player that joins, instead of the 'think checks all players' way you're attempting now.
I don't believe there will be any performance degradation compared to the way now, and, you won't have to worry about duplicating/repeating or clearing out old function names.