No, it does NOT "work". It may compile but it will most certainly NOT work. "arr" resolves to the memory address of the first element of the array, which is a meaningless thing to pass as an argument to pinMode.
The pin number is some kind of integer. The exact type is, in most cases, not terribly important, as the compiler will cast the argument to the correct size integer type. But passing an array address as you are doing will accomplish nothing of value.
civgmh:
Are there any side effects of such an unconventional syntax?
Yes - there is a small side effects - your pins won't be set as output. As Arduino (Atmega) pins default to inputs, that could actually be considered a bug by some old generation picky programmers who like things when they work..Now if you don't use the pins in the code or use them as input, then you'll be fine.