Welcome to the board
An array formula with more than 255 characters cannot be entered directly. You have to split it, keeping always a correct formula syntax, and use Range.Replace() to build the formula.
I posted a solution with examples here:
Hope it helps.