So you haven't taken Algebra 1 yet? ;D
An array, when you visualize it, is a field of numbers within brackets seperated by commas.
[1,4,2,435897,-8.4]
To set an array, use something like this.
myArray = [1,4,2,435897,-8.4]
Now you can tell OFP to look at a certain element of the array. The first element is always "0".
myNumber = myArray select 0
myNumber is now equal to 1.
myNumber = myArray select 3
myNumber is now equal to -8.4.
You can add elements to arrays like this.
myArray = myArray + [23]
myArray is now equal to [1,4,2,435897,-8.4,23]
You can remove a certain element like this.
myArray = myArray - [4]
myArray is now equal to [1,2,435897,-8.4,23]
With some more creativity, you can remove a certain element of the array.
myArray = myArray - [myArray select 2]
myArray is now equal to [1,2,-8.4,23]
You can also check to see if a certain number is in the array.
?(23 in myArray): hint "true"
true
?(56 in myArray): hint "true"
...
Now, the really trippy part is that objects work in arrays too.
newArray = [flag1, flag2]
A useful command with object arrays is forEach. The command in commas is executed for each element or the array, with _x being the object.
"_x setFlagSide WEST" forEach newArray
If you've set some of your units to a group, you can use the units in it as an array. This would heal all members of the player's group.
"_x setdammage 0" forEach units (group player)
Hope it made some sense. Good luck.