I would suggest making an array of arrays. In other words, a multidimensional array. That way, you can reference all arrays outside of the function within that one returned array. To learn more on how to do this, this link is quite useful: http://sharkysoft.com/tutorials/jsa/content/019.html