What do you want the function to do?
Consider first putting the results of the inner SELECT into a JSON array, then pass the argument to my_function as json.
Also, a scalar UDF can take an argument of type Array but the Array can’t be returned from a query.
set @j = (select json_agg(myString) from myTable);
with strings as (select json_agg(myString) as s from myTable)
select my_function(s) from strings.
See also the json_to_array and TABLE functions in the documentation.
And if your function is aggregating data from the array, consider a user-defined aggregate function: CREATE AGGREGATE