I've been working on this tonight and actually solved it even if it's maybe not the most effective way.
I started with using Compose and insert a JSON formatted array with the file types and their corresponding reference types.
[
{
"id": 1,
"file_type": "pdf",
"reference_type": "Pdf"
},
{
"id": 2,
"file_type": "ppt",
"reference_type": "PowerPoint"
},
{
"id": 3,
"file_type": "pptx",
"reference_type": "PowerPoint"
},
{
"id": 4,
"file_type": "xls",
"reference_type": "Excel"
},
..............
I then used a Array filter like this:

indexOf(outputs('Copy_file')?['body/Path'], item()?['file_type'])
From here I add the corresponding reference type into my file array using:

first(body('Filtermatris_2'))?['reference_type']
I then use my file array to add references (attachments) to my planner task:

All this is inside a Apply to each that goes through all files in a specified SharePoint folder.