How do I use variables in functions/procedures

thanks guys, I am looking at a cross between qubits-us and paulRB’s answer

byte a[5] = {1,2,3,4,5};
byte b[5] = {1,2,3,4,5};

before setup and

void pin5( byte a[], byte b[])
{
  digitalWrite(clockPin, LOW);
  shiftOut(dataPin, clockPin, MSBFIRST, a[1]);//feeds first chip
  shiftOut(dataPin, clockPin, MSBFIRST, b[1]);//feeds first chip
  shiftOut(dataPin, clockPin, MSBFIRST, c);//feeds first chip
  shiftOut(dataPin, clockPin, MSBFIRST, d);//feeds first chip
  shiftOut(dataPin, clockPin, MSBFIRST, e);//feeds first chip 
  delay(300);
  digitalWrite (latchPin,HIGH);
  digitalWrite (latchPin,LOW);
  delay(500);

called from within the loop.

I have entered the above and it compiles.

I think I now need to put it in a for statement so the array number changes with each pass?

If I have assigned the data type in building the array why do I need to do it again in the void brackets?