Converting a piece of PIC code to Arduino

Not really.

The other pins of the PIC aren't set as output so how could It write then.

It would be like this to set the data_bits to the outputs ?

digitalWrite(GP0 , val_GPIO);
digitalWrite(GP1 , val_GPIO);
digitalWrite(GP4 , val_GPIO);
digitalWrite(GP5 , val_GPIO);