I also made myself a "Raycast To Object" action for various reasons and find it useful, but check out Unity's Linecast functionality which is essentially an easier way of doing the same.
I still don't get why you're wanting to store a "miss" distance etc. Found your explanation quite confusing which might just be my fault. An Event for a miss can already be sent by 1) Setting an Event to call on a Hit, and 2) Adding a Finished transition to the state (so if the Hit event doesn't get called, the Finish will and you know it's a miss). The direction and distance of the missed ray will be exactly equal to your input direction and distance, which you must already have as variables somewhere. (The animated float you mentioned). It takes about five seconds to add a separate state and Set VectorXYZ action to set these on a raycast miss, right?
Anyway, if that five seconds bothers you more than writing your code above, well... good you on, I guess!