If you're looking to use a software data transfer, you don't want to use the functions digitalWrite. They are very slow, this is because they need to translate the pin number through a table to an actual register (PORTx), mask the right bit and change it. All pins in arduino are mapped to numbers, while underneath they can belong to port A, B, C, and even more on the MEGA version of the Arduino.
It's much faster to directly modify the AVR registers. Such as PORTB and a-like. You indeed need to step through each bit. I would create a for loop from 0 to 15 and do some bit shifting and masking.
Because I don't you know pinning configuration I can't give an exact example. However it will probably look very close to this. With 'very close' I mean that this is untested.
void ShiftOut(UI16_t data)
// Initialize (you may want to set CLK to low) - as we're toggling later on.
// step from bit 0 to 15
for(UI08_t i = 0; i < 15; i++)
// Check the content of this data bit
// Shift data so this bit is LSB, and mask it with 1 so we only look at this bit.
if ((data >> i) & 0x1 == 1)
// set data pin high, like PORTB |= 1<<4;
// when pin 4 of portB is your data pin
// Doing an OR will make pin B4 always high
// set data pin low, like PORTB &= ~(1<<4);
// Doing an AND with the inverse means all pins except B4 will be unchanged
// Generate clk to 'transfer' the bit:
// This can likely be done by using PORTB ^= 1 << 5; (pin B5 in this example)
// ^= toggle
// Do this TWICE, so CLK goes high/low
// as you're using a shift register, you may want to toggle LATCH pin as well..
To find out what hardware pin number (don't assume pin 4 is pin B4 or A4!) you need to look at the schematic of Arduino.
I've ran a similar code on a PIC32 (runs at 80MHz). The PIC32 was able to do this at about 1,5 MHz, but a few extra lines of code was running in main() to compute a new output. Nevertheless, it can be done very quickly.