######Finds which array element of attribute modifiers contains the generic.armor tag
data merge entity @s {Tags:[]}
tag @s add a
tag @s add b
tag @s add c
tag @s add d
tag @s add e
tag @s add f
tag @s add g
data modify entity @s[tag=!FoundArmorTag] Tags[0] set from entity @s[tag=!FoundArmorTag] Item.tag.AttributeModifiers[0].Name
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag0
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag
data modify entity @s[tag=!FoundArmorTag] Tags[0] set from entity @s[tag=!FoundArmorTag] Item.tag.AttributeModifiers[1].Name
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag1
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag
data modify entity @s[tag=!FoundArmorTag] Tags[0] set from entity @s[tag=!FoundArmorTag] Item.tag.AttributeModifiers[2].Name
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag2
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag
data modify entity @s[tag=!FoundArmorTag] Tags[0] set from entity @s[tag=!FoundArmorTag] Item.tag.AttributeModifiers[3].Name
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag3
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag
data modify entity @s[tag=!FoundArmorTag] Tags[0] set from entity @s[tag=!FoundArmorTag] Item.tag.AttributeModifiers[4].Name
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag4
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag
data modify entity @s[tag=!FoundArmorTag] Tags[0] set from entity @s[tag=!FoundArmorTag] Item.tag.AttributeModifiers[5].Name
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag5
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag
data modify entity @s[tag=!FoundArmorTag] Tags[0] set from entity @s[tag=!FoundArmorTag] Item.tag.AttributeModifiers[6].Name
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag6
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag
data modify entity @s[tag=!FoundArmorTag] Tags[0] set from entity @s[tag=!FoundArmorTag] Item.tag.AttributeModifiers[7].Name
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag7
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag
data modify entity @s[tag=!FoundArmorTag] Tags[0] set from entity @s[tag=!FoundArmorTag] Item.tag.AttributeModifiers[8].Name
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag8
tag @s[tag=!FoundArmorTag,tag=generic.armor] add FoundArmorTag