Switching LED on and off using microcontroller
A common approach is, to read the input pin, check the read value and then write to the output pin.
As the events on the input pin are generally asynchronous to your code, you have to check it more than once, which means in fact you have to check it regularily.

So in your arduino sketch you could write:

loop()
{
  uint8_t pin1=digitalRead(PA0);
  if (pin1==HIGH)
  {
     digitalWrite(PA4, HIGH);
  }
  uint8_t pin2=digitalRead(PA1);
  if (pin2==HIGH)
  {
     digitalWrite(PA5, HIGH);
  }
  // and so on
}


I assume you have already done the prerequisites in your setup() routine.