Replace inadvertent global variables

Accidentally left global variables in qqplotArray() and histogramArray()
functions.