1) What is a better method of displaying the output? (the lines always
get erased as the array draws new lines)

arrays in pd only have one y value for each x value.

as far as i know, there are no 'array' clones in pd that allow for multiple y values.