Arduino / Relay interface???

Oh no, you have a path from 12V to the Arduino. The Arduino might already be damaged.

First the relay side of 4N33:
The leak current through the 4N33 transistor could turn the transistor on.
If you want to use it this way, add an resistor from Base to Emitter of the transistor. For example also 2k2 (or 4k7 or 10k).

Next the Arduino side of the 4N33:
Don't connect something to 12V at the Arduino side. The Arduino runs at 5V.
You could connect pin 2 of the 4N33 to ground, and pin 1 via a resistor of 1k to the a Arduino output.
Use a different output pin, since the one you used might be damaged.

The whole problem started with the 4N33, if you didn't use that at all, you could connect an Arduino output to the 2k2 resistor to the 2N2222. In that case you would not need the resistor from Base to Emitter. It would work fine, you even thought of the flyback diode next to the relay.

About the sketch (your code). Is that an example you found somewhere ?
The Arduino Uno has 14 digital pins and 6 analog pin. The analog pins can also be used as digital pins.
But pin 0 and 1 are use to communicate with the "serial monitor". If you are new to Arduino, you must use the "serial monitor", you can't do without.
So you have 14+6-2 = 18 pins. That's why you can have 18 relays.
The analog pins are called 'A0' ... 'A5'. You use them as pin 14...19. I think that is valid, but I haven't seen it before.