You cannot return the array as the function result. Therefore, you must pass in the array as a parameter:
void minmax(double values[], double result[])