How bad is raytracing for performance? Any better alternative?

Why do you think it’s expensive? Also, you can run it 10x per second rather than 60 - it will be unnoticeable. But, as above, having a small collision volume in front of a character that adds / removes (unique) entities to / from an array on overlap is not a bad idea at all.

Sounds somewhat similar to this, it does not even use an array:

The setup is further down in the thread. Would that work for you?