Transistor h-Bridge all NPN - Arduino code?

Depending on your transistors, since you say NPN, you are using BJTs. Assuming your transistors don't require more than 5mA of current each, you can just attach a properly sized resistor between an arduino pin and the base of the transistor. You can then control each transistor independently. However, you will just have to be very very careful that you never turn on the wrong transistors at once. You need to make sure you turn off any transistors before turning any other ones on.