There is no easy solution, for sure storing only non-null values will not work. For a color channel 120,67,0 might be perfectly valid and should be restored as that.
Also only storing data once for an OFF command (until it has been restored) might be unexpected, since there is no 1-1 relationship between DMX channels and thing channels. You can re-use DMX channels in several things (e.g. chasers and dimmers). Imagine for a single channel bound to a dimmer and a chaser thing:
DMX channel is at 95%.
Dimmer receives OFF, stores 95% and sets the channel to 0%.
Chaser is turned on and the result is 15%.
Someone comes in (not knowing what happened before) pushes a wall switch „OFF“.
What would he expect if he pushes „ON“ now? The 95% or the 15%? I would guess the 15%.