Instead of a Boolean array, you could use an int array, and write the node count to every square that a slider attacks. Then there is no need to first clear it. I used this technique in my engine CrazyWa to determine the initiative bonus, which is based on the number of attacked squares next to the King of the side that doesn't have the move. So when I generate the moves, I also update this 'attacks board', and immediately afterwards I then examine the squares around the enemy King to determine how many of them were attacked.
Wouldn't you need to still increment/decrement rays when a slider is moved? Or modify the table when a friendly piece moves and doesn't block a slider anymore?
As I understand the idea, which seems like an improvement of mine, you would still need to clear it?