You can't return strings because strings are arrays and you can't return arrays, you can only return a single cell.
(Also, the function would have to be defined as String:GetPlayerName() to avoid a tag mismatch, but that's not sufficient since it really is a String array and you can define a String[]:function())
Also, even if you could return an array, this code would not work since you are attempting to return a local array (that exists on the stack), which is freed when the function returns (that would leave a dangling pointer, if pawn had pointers).
What you have to do is define the function like all the other sourcemod function that "return" strings, by passing the string and max length and copying the string to the result
Code:
GetPlayerName(any:target_playerClient, String:name[], maxlength)
{
new String:target_playerName[20];
GetClientName(target_playerClient,target_playerName,sizeof(target_playerName));
strcopy(name, maxlength, target_playerName;
}