Excellent work! You can move the arrayformula to the header though, to make sure you won’t somehow forget about it and delete line 2
I wrote about it here.