Check out example codes for "unity for loop array". It will help you in understanding the concepts better.

Code Example 1

for(int i = 0; i < Objects.Length; i++)
{
  dot.SetActive(Objects[i] == ItemLookingAt);
}

Code Example 2

for (int i = 0; i < Objects.Length; i++)
{
  if (Objects[i] == ItemLookingAt)
  {
    dot.SetActive(true);
  } else
  {
    dot.SetActive(false);
  }
}

Learn ReactJs, React Native from akashmittal.com