Instruction: Write a function that flattens a nested array to a single level.
Context: This question assesses the candidate's ability to work with arrays and their understanding of recursion.
hard