#remove the chosen artifact from array
$execute store result score .artifact mechanics run data get storage minecraft:mechanics artifact.list_$(quality)[$(id)]
$data remove storage minecraft:mechanics artifact.list_$(quality)[$(id)]