Added mapping function parameter in Dictionary.toArray