Quotas against an array attribute

Is there any way to set up a quota or quotas to count against an array of items? Eg. I receive requests containing authn with a JWT token that contains an array of pets:

{ “pets”: [“dog”, “cat”] }

For this request, I want to count a separate quota against each element in the array. Ie. It would increment and check a “dog” quota and a “cat” quota. The next request may have a JWT with:

{ “pets”: [“cat”, “bird”] }

This would increment and check the “cat” quota and a “bird” quota. Is this kind of thing possible in Istio using the existing quota support? (Note: The type of pets can be assumed to be a closed set.)