get_data fills a passed in array or creates one if not passed in