Figured out how to build arrays recursively