Plot 2D function: do I need to pass all the values to the function?
How about defining a plot function like: 

function meshfcn(fcn, x, y)
    [X, Y] = meshgrid(x, y);
    Z = arrayfun(@(xx, yy)(fcn([xx, yy])), X, Y);
    mesh(X, Y, Z);


and then use it: 

x = -2:0.1:2; % the range of 'x' values to plot. change to your needs
y = -2:0.1:2; % the range of 'y' values to plot. change to your needs
fcn = @powellsumfcn; % the function needs to be on the path
meshfcn(fcn, x, y)