Utils: support recursion on cleanArray()