.classList.add() Question

I am about halfway through the Intermediate Javascript section of the Web Development path and decided to consolidate my knowledge with some experimentation. I am trying to make an image based quiz a la Buzzfeed and want to prevent a code from executing after an image has already been clicked.

First, I created arrays for each group of images with the .getElementsByClass method, then stored each collection as part of an array. Images are based off of classes I added in the html. I also created a collection of elements that have the class of “clicked” which I add with an event listener later.

const classOne = document.getElementsByClassName('one');
const classTwo = document.getElementsByClassName('two');
const classThree = document.getElementsByClassName('three');
const classFour = document.getElementsByClassName('four');
const classFive = document.getElementsByClassName('five');
const classNums = [classOne, classTwo, classThree, classFour, classFive];
let classClicked = document.getElementsByClassName('clicked');

Then I created a function to determine if an element has a class of “clicked”.

const isClicked = element => { 
 for (let i = 0; i < classClicked.length; i++) {
    if (element === classClicked[i]) {
      return true;
    } else {
      return false;
    };
  };
};

Then I added a function that would check if the image has been clicked, find the numbered class of the event.target change the style of and add the “clicked” class to all elements in that class, then change the style on the event.target.

const shader = event => {
  if (!isClicked(event.target)) {
      classNums.forEach(array => {
        for (let i = 0; i < array.length; i++) {
          if(array[i] === event.target) {
            for (let j = 0; j < array.length; j++) {
              array[j].style.opacity = 0.5;
              array[i].classList.add('clicked');
            };
          };
        };
    });
    event.target.style.backgroundColor = 'green';
    event.target.style.opacity = '1.0';
  };
};

When I tested the code on the page, only the first image I clicked would be denied additional format changes. It appears all of the elements in the numbered class have “clicked” added to the class list. I also tried adding a separate function to evaluate isClicked(event) before running any other code which resulted in any image being able to be clicked multiple times. I am guessing there is something about element collections that escapes me but I cannot seem to figure it out based on MDN nor google search. Any experts that can help me understand what is happening?