The most natural are 1a, 2a, 3b, 4a, 5a. 2b is incorrect. An adverbial indicating a point in time ("when I was cutting onions") is incompatible with the perfect aspect. ["while I was cutting onions" is more idiomatic, but also impossible in this sentence.]
With the past tense ( Example 1 ) adverbials of duration (all night, all day, all morning, for a long time) are most natural with
I'd like to clarify one point in your answer. You told me that in the PAST TENSE an adverbial of DURATION works more with the SIMPLE form of the verb, whether in the PRESENT TENSE it works better with the PROGRESSIVE form of the verb, is that so?
ex1: We WATCHED tv ALL NIGHT. We WERE WATCHING tv AT 10 o'clock last night. (AT = adverbial of point in
In the rain example, both are OK. The likely distinction is more or less as follows.
"It has rained all night" is a conclusion you draw when you wake up and look out the window. You see that it has rained all night. It makes the raining all night an achievement of Mother Nature, thought of as a single weather event. Or you could say "It must have