There is no easy way I know of that lets you map the Items to things from a rule. The LinkRegistry is not available as far as I can tell. Consequently you have to do the mapping yourself, be it through a separate rule per Thing or by using Groups.
But I’ll second @binderth’s question, wouldn’t it make much more sense to use NULL or UNDEF for Items where you cannot know the state of the sensor because the device if OFFLINE? Setting it to a number like that poses a bunch of problems.
I’ll also second his recommended approach.
If you don’t want to create a bunch of separate rules, one for each Thing, you can use Thing Status Reporting [4.0.0.0;4.9.9.9] to call a rule you write when any Thing goes OFFLINE. But you’ll still need to map the Thing to the Items yourself.