copy item components from item in inventory to `/give` command

before we could do smth like

data modify storage <storage> <path> set from entity @s Inventory
data modify storage <storage> <path> set from storage <storage> <path>[{Slot:100b}].tag

then macro into a give function:

$give @s $(id){$(tag)} $(count)

but this isn't possible with the new components assignment format in /give - any alternatives?

Continue to help post