Code a bespoke version of forEach, map, and reduce.
Implement one Python function that selects the requested operation and applies a named callback without using Python's built-in map, filter, reduce, or list comprehensions. The function must preserve order, avoid mutating the input, return None for forEach, and support an optional initial accumulator for reduce.
def bespoke_array_methods(values, operation, callback, initial=None): accepts integer arrays, an operation of forEach, map, or reduce, and callbacks named identity, double, add, or multiply.
def bespoke_array_methods(values, operation, callback, initial=None):