Also, a good practice is to store arrayformulas in the header so you don’t accidentally delete them.
I covered that part in this post, hope it helps.