Difference between superscripts and subscripts

Yes, the subscripts on w_i and x_i are selecting one particular color value (RGB) at one particular position in the image. Here’s a thread which discusses in detail how the “unrolling” works. If you read through the whole thread, you learn that there are more than one ways to do it.