Shift registers

Hello everyone. How can i shift what pattern i want into shift register and also with more then 8 bits. I want 16, or 32 bits.
Let's say i want 0000000000000001 then 0000000000000011 then latch it and then shift this 2 bits of one all over the end.
And why do i have to use shiftOut function (it seems like working only with one byte)? I tried doing it manually with digitalWrite ,delay and a vector, but nothing happened. Thank you!

And why do i have to use shiftOut function (it seems like working only with one byte)?

You don't have to, and the nature of a shift register means that if I want to output 16 bits to it, but my function only accepts 8, I simply have to do 2 sequential shifts.

I tried doing it manually with digitalWrite ,delay and a vector, but nothing happened. Thank you!

Without any information like wiring diagrams or code, all I can off you is a empathetic that sucks!

Your data is an int, yes? Which is 2 bytes.
So send out 2 bytes:

digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, MSBFIRST, highByte(your_int));
shiftOut(dataPin, clockPin, MSBFIRST, lowByte(your_int));
digitalWrite ( latchPin, HIGH);

SRCLR on shift register like 74HC595 tied to +5.
OE/ on shift register like 74HC595 tied to GND.
0.1uF cap on VCC pin of shift register like 74HC595 from +5 to Gnd.

Does the same as your attempt to use digitalWrites to control dataPin, clockPin, and latchPin.