input pin pressed button

halo guys,
please help me.. pleae write me sketch code for input pin for my project.. i create taillight for may motorcycle.. there will be a stop light, sign left ,sign right... i already write for hazard light pattern n it work fine..but all fail (leds not on) when stop light, sign left, sign right pressed/active/high.. i use nano..i use step down to 5v connecting arduino because it just blink evrytime i connect thought 12v to vin pin.. so please help me write a code to place before/after hazard code below.. thank you before..

  const int ledPins[] = {
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
int buttonPinstop = A5;
int buttonPinleft = A6;
int buttonPinright = A7;
int buttonState = 0;

;

void setup() {  

  pinMode(A5. INPUT);
  pinMode(A6, INPUT);
  pinMode(A7, INPUT);
  
  byte n;

  for (byte i = 0; i < n; i++) {
  
  pinMode(ledPins[i],OUTPUT);
  }

  byte i;

  for (byte i = 2; i < 17; i++)
  {
    pinMode(ledPins[i],OUTPUT);
  }


}

void loop () {

//running/hazard light active
led pattern/hazard 1
led pattern/hazard 2
etc...

// where and what code for A5, A6 and A7 input for stop, sign left and sign right?

//A5 stop, if high leds will blinks until it low
    (leds pin 2-10 will blinking)

//A6 left, if high led chaser active from right to left
    digitalwrite(14, HIGH);
    delay(50);
  
 digitalwrite(15, HIGH);
    delay(50);
    digitalwrite(16, HIGH);
    delay(50);

    digitalwrite(14, LOW);
  
 digitalwrite(15, LOW);
    digitalwrite(16, LOW);
  

//A7 right, if high led chaser active from left to right
    digitalwrite(11, HIGH);
    delay(50);
  
 digitalwrite(12, HIGH);
    delay(50);
    digitalwrite(13, HIGH);
    delay(50);
  
 
    digitalwrite(11, LOW);
  
 digitalwrite(12, LOW);
    digitalwrite(13, LOW);
}

Not sure what exactly you want to do with the LEDs, so I only tried to make a framework.
You still have to enter the LED blink code in the right places.
The code assumes you have (10k) pull down resistors on the switches, and the switches between 5volt and pin. Or voltage dividers, to limit pin voltage to 5volt, if this is going on a real motorbike.
The code for pin A6 and A7 is a bit different, because they are analogue-in pins only.
Untested !
Leo..

const byte ledPins[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17};
const byte hazardPin = A4;
const byte stopPin = A5;
const byte leftPin = A6;
const byte rightPin = A7;
int leftState, rightState;

void setup() {
  for (byte i = 2; i < 17; i++) pinMode(ledPins[i], OUTPUT);
}

void loop () {
  while (digitalRead(hazardPin)) hazardLight();
  if (digitalRead(stopPin)) stopLight();
  leftState = analogRead(leftPin);
  if (leftState < 300) leftState = 0;
  rightState = analogRead(rightPin);
  if (rightState < 300) rightState = 0;
  if (leftState || rightState) indicatorLight();
}

void hazardLight() {
  //hazard blink code here
}

void stopLight() {
  //stop code here
}

void indicatorLight() {
  if (leftState) {
    //left blink code here
  }
  else {
    // right blink code here
  }
}