Recursively fills an array/slice with sub-directories.