input analog array > output digital array

I think I'm asking it to read the value and then use it to create the second array

The value that analogRead() returns goes where?

   int val = analogRead(pinArray[someIndex]); // Store the result in a variable
   if(val > 512)
      someOtherArray[someOtherIndex] = 1;
   else
      someOtherArray[someOtherIndex] = 1;