class TemporalArrayUtils {

    private final TemporalFormattingUtils temporalFormattingUtils;
    
    public TemporalArrayUtils(final Locale locale, final ZoneId defaultZoneId) {
        super();
        Validate.notNull(locale, "Locale cannot be null");
        Validate.notNull(defaultZoneId, "ZoneId cannot be null");
        temporalFormattingUtils = new TemporalFormattingUtils(locale, defaultZoneId);
    }

    public String[] arrayFormat(final Object[] target) {
        return arrayFormat(target, temporalFormattingUtils::format, String.class);
    }

    public String[] arrayFormat(final Object[] target, final Locale locale) {
        return arrayFormat(target, time -> temporalFormattingUtils.format(time, locale), String.class);
    }

    public String[] arrayFormat(final Object[] target, final String pattern) {
        return arrayFormat(target, time -> temporalFormattingUtils.format(time, pattern, null), String.class);
    }

    public String[] arrayFormat(final Object[] target, final String pattern, final Locale locale) {
        return arrayFormat(target, time -> temporalFormattingUtils.format(time, pattern, locale, null), String.class);
    }

    public Integer[] arrayDay(final Object[] target) {
        return arrayFormat(target, temporalFormattingUtils::day, Integer.class);
    }

    public Integer[] arrayMonth(final Object[] target) {
        return arrayFormat(target, temporalFormattingUtils::month, Integer.class);
    }

    public String[] arrayMonthName(final Object[] target) {
        return arrayFormat(target, temporalFormattingUtils::monthName, String.class);
    }

    public String[] arrayMonthNameShort(final Object[] target) {
        return arrayFormat(target, temporalFormattingUtils::monthNameShort, String.class);
    }
    
    public Integer[] arrayYear(final Object[] target) {
        return arrayFormat(target, temporalFormattingUtils::year, Integer.class);
    }
    
    public Integer[] arrayDayOfWeek(final Object[] target) {
        return arrayFormat(target, temporalFormattingUtils::dayOfWeek, Integer.class);
    }
    
    public String[] arrayDayOfWeekName(final Object[] target) {
        return arrayFormat(target, temporalFormattingUtils::dayOfWeekName, String.class);
    }

    public String[] arrayDayOfWeekNameShort(final Object[] target) {
        return arrayFormat(target, temporalFormattingUtils::dayOfWeekNameShort, String.class);
    }

    public Integer[] arrayHour(final Object[] target) {
        return arrayFormat(target, temporalFormattingUtils::hour, Integer.class);
    }

    public Integer[] arrayMinute(final Object[] target) {
        return arrayFormat(target, temporalFormattingUtils::minute, Integer.class);
    }

    public Integer[] arraySecond(final Object[] target) {
        return arrayFormat(target, temporalFormattingUtils::second, Integer.class);
    }

    public Integer[] arrayNanosecond(final Object[] target) {
        return arrayFormat(target, temporalFormattingUtils::nanosecond, Integer.class);
    }

    public String[] arrayFormatISO(final Object[] target) {
        return arrayFormat(target, temporalFormattingUtils::formatISO, String.class);
    }

    private <R extends Object> R[] arrayFormat(
            final Object[] target, final Function<Object, R> mapFunction, final Class<R> returnType) {<FILL_FUNCTION_BODY>}
}

        Validate.notNull(target, "Target cannot be null");
        return Stream.of(target)
            .map(time -> mapFunction.apply(time))
            .toArray(length -> (R[]) Array.newInstance(returnType, length));
    
<no_super_class>