how do I read the value of each pin in the array (a variable)
Using a for loop.
byte somePins[] = { 5, 8, 10, 11, 13 };
const byte pinCount = sizeof(somePins) / sizeof(somePins[0]); // Count the pins
byte pinVals[pinCount];
void loop()
{
for(byte p=0; p<pinCount; p++)
{
pinsVals[p] = digitalRead(somePins[p]);
}
}
and subsequently print the values?
Not surprisingly, the same way.
Also, how do I get the DHT-22 values into the array since they are a part of the library?
The values are not part of the library. The values are outputs from library methodss, just like the values output by the digitalRead() function.