/loot replace entity @p armor.chest loot what:ever
#loot table "what:ever":
{{ "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:ice", "functions": [ { "function": "set_count", "count": { "min": 1, "max": 4 } } ] } ] } ]}
Oops, I accidently saved this post before I added more info. Here's the loot table I used. I tested with myself and also a fox. I couldn't put the ice in my armor slot or the ArmorItems[0~2] nbt of the fox.