Certainly looks like a case for a macro
/array<CR>
to jump to the first arrayqq
to record the macro into register qde
to delete the word arrayma
to save the cursor position on the first bracket at mark a%r]
to jump to the matching bracket, replace it by another bracket- `ar[
`ar[
to jump back to position a and replace that bracket q
to end recording of the macro
After that, it's just repeatedly pressing n
to jump to the next match and @q
to play the macro. You could make the search part of the macro and just execute until it stops, but I thought you might prefer to visually check each substition... you choose :)