An array is just something like this:
%cow.eats["grass"] = true;
%cow.eats["hay"] = false;
%cow.drinks["milk"] = false;
And you could then find out the values by doing:
%foodType = "grass";
if(%cow.eats[%foodType])
echo("The Cow DOES eat Grass!");
You can basically add onto another variable that an object has, so you could also make:
%horse.food[1] = "Hay";
%horse.food[2] = "Saltlick";
%horse.food[3] = "Cranberry Juice";
And you could loop through all these by doing:
%i = 1;
%food = %horse.food[%i];
while(%food !$= "")
{
echo("The horse eats "@ %food);
%food = %horse.food[%i++];
}
Or something. I'm sure theres another thread on this somewhere.