How would you flatten a nested array without using the flat function?
Implement flatten_nested_array(arr) for an array containing integers or other nested arrays. Return a single flat array containing all integers in their original left-to-right order, including values inside empty or deeply nested arrays. Do not use a built-in flattening helper.
def flatten_nested_array(arr):