help with arrays

can we for example write this code:
digitalWrite(pin,variable)//variable can be only a bit.1 or zero

To answer your specific question, no, you cannot write that and have the variable be only a bit.

You could, however, hold the zeroes and ones as bits of a variable, read a specific bit from that variable and use that as the second parameter in digitalWrite()

digitalWrite(pin, bitRead(variable, bitNumber));