How to return a single composite type from a plpgsql function without repeating the composite type's parts explicitly as OUT parameters?
You can return a row type by using an expression with that type.
here it's effectively select my_table from my_table 

create function my_func4(f1_to_look_up int) returns my_table language plpgsql
as $$
    begin
        return my_table from my_table where f1 = f1_to_look_up;
    end; 
$$;


or via a variable

create or replace function my_func4(f1_to_look_up int) returns my_table language plpgsql
as $$
    declare
        retval my_table;
    begin
        select into retval * from my_table where f1 = f1_to_look_up;
        return retval;
    end; 
$$;




You can also use a row constructor, which would be especially useful if the query is more complicated and you need to return values taken from more than one table joined together:

create function my_func5(f1_to_look_up integer)
 returns my_table
 language plpgsql
as $function$
begin
  return row(t.*) from my_table as t where f1 = f1_to_look_up;
end
$function$
;


The key is that where the plpgsql syntax documentation indicates that you can write return expression, "expression" can be everything that would ordinarily follow "select" in a normal SQL query.