recursively fetch nested array keys