Need help identifying how to make a function selectable using table() clause and a custom data type
You need to define the function as pipelined. Below works in 19c.
Package header:
create or replace package my_new_package is

  -- Types
  -------------
  type my_data_type is record (
      myfield1          VARCHAR2(10)
      ,myfield2         VARCHAR2(10)
    );
    
   type my_data_type_TABLE is table of my_data_type;

   -- Functions
   -------------
   FUNCTION get_data(i_id_number varchar2) return my_data_type_table pipelined;

end my_new_package;
/

Package body:
create or replace package body my_new_package is

  function get_data(i_id_number varchar2) return my_data_type_table pipelined IS  
    current_row my_data_type;
    all_rows my_data_type_table;
    n integer;

    -- Will update the cursor to pull real data
    cursor cur is
      select '1' myfield1, '10' myfield2 from dual
      union all
      select '2' myfield1, '20' myfield2 from dual
    ;
  BEGIN    
    n := 0;
    for rec in cur LOOP
      n := n+ 1;
      pipe row(rec);
    END LOOP;
    
  END;


end my_new_package;
/

Test:
select * from table(my_new_package.get_data('A'));

MYFIELD1   MYFIELD2  
---------- ----------
1          10        
2          20