An alternative might be to create your record and the table of records as a database object type, and nested table of object types respectively.
Then you have access to use them within SQL, and hence things like:
select distinct ...
from table(my_nested_table)
and the various set operators in PLSQL , ie,
http://docs.oracle.com/database/121/LNPLS/composites.htm#LNPLS99916 would become available to you.