Is there a better way to do repetetive operations?

Im thinking that there is a better way to write this code and do the same thing

const int LTS = 2;
const int HIB = 3;
const int CEL = 4;
const int RTS = 5;

int LTSState = 0;
int HIBState = 0;
int CELState = 0;
int RTSState = 0;
void setup() {
  pinMode(LTS, INPUT_PULLUP);
  pinMode(HIB, INPUT_PULLUP);
  pinMode(CEL, INPUT_PULLUP);
  pinMode(RTS, INPUT_PULLUP);
  Serial.begin(115200);



}

void loop() {
   LTSState = digitalRead(LTS);

  if (LTS == HIGH) {
    Serial.print(F("bt1.val="));
    Serial.print(1);
    Serial.write(0xff);
    Serial.write(0xff);
    Serial.write(0xff);

  } else {

    Serial.print(F("bt1.val="));
    Serial.print(0);
    Serial.write(0xff);
    Serial.write(0xff);
    Serial.write(0xff);

  }
  HIBState = digitalRead(HIB);

  if (HIB == HIGH) {
    Serial.print(F("bt3.val="));
    Serial.print(1);
    Serial.write(0xff);
    Serial.write(0xff);
    Serial.write(0xff);

  } else {
    Serial.print(F("bt3.val="));
    Serial.print(0);
    Serial.write(0xaaff);
    Serial.write(0xff);
    Serial.write(0xff);

  }
  CELState = digitalRead(CEL);

  if (CEL == HIGH) {

    Serial.print(F("bt2.val="));
    Serial.print(0);
    Serial.write(0xff);
    Serial.write(0xff);
    Serial.write(0xff);

  } else {
    Serial.print(F("bt2.val="));
    Serial.print(1);
    Serial.write(0xff);
    Serial.write(0xff);
    Serial.write(0xff);

  }
  RTSState = digitalRead(RTS);
  if (RTS == HIGH) {
    Serial.print(F("bt4.val="));
    Serial.print(0);
    Serial.write(0xff);
    Serial.write(0xff);
    Serial.write(0xff);

  } else {
    Serial.print(F("bt4.val="));
    Serial.print(1);
    Serial.write(0xff);
    Serial.write(0xff);
    Serial.write(0xff);

  }
}

Ive seen some different codes that use an array, but I am not advanced enough to understand how it work.

The goal I want to accomplish is make a code for this that basically changes the variable and its value whenever the state changes as I believe this code will keep sending every loop cycle and I dont need that. I could millis the code to slow down the updates, but Im unsure of how to update quickly, but only when a state changed and do it with less line of code (if possible).

Simply put, I want to take the multiple if else functions and put place holders in the Serial.print areas so I can have one "template" of code for this and just fill out the variable and its value

Any ideas?

your if() should be like this:

LTSState = digitalRead(LTS);

  if (LTSState == HIGH) {

Since LTS, HIB, CTL and RTS are pin numbers and thus constants, they will always be HIGH ! ! !

LTSState, HIBState, CELState and RTSState are what you should be using in the if() statements.

You could move the debouncing and state change detection to a library,
you could create one function that is able to set any of your fields.

#include <Bounce2.h> // https://github.com/thomasfredericks/Bounce2

const byte LTS = 2;
const byte HIB = 3;
const byte CEL = 4;
const byte RTS = 5;

Bounce kLTS, kHIB, kCEL, kRTS;

void setup() {
  kLTS.attach(LTS, INPUT_PULLUP);
  kHIB.attach(HIB, INPUT_PULLUP);
  kCEL.attach(CEL, INPUT_PULLUP);
  kRTS.attach(RTS, INPUT_PULLUP);
  Serial.begin(115200);
}

void loop() {
  if (kLTS.update()) {
    setButton(1, kLTS.rose());
  }
  if (kHIB.update()) {
    setButton(3, kHIB.rose());
  }
  if (kCEL.update()) {
    setButton(2, kCEL.rose());
  }
  if (kRTS.update()) {
    setButton(4, kRTS.rose());
  }
}

void setButton(byte number, bool value) {
  Serial.print(F("bt"));
  Serial.print(number);
  Serial.print(F(".val="));
  Serial.print(value);
  Serial.write(0xff);
  Serial.write(0xff);
  Serial.write(0xff);
}