You shall fill the array with "1" values and then you shall add a ramdomly positionned "2" in that same array 60 times ...
When filling with "2"s you would run into the problem that random filling would hit other already filled in "2"s in the process, so you'd have to loop some unnecessary times till you managed to find a free place for all "2".
Easier way that is random and still obtains a 40/60-distribution:
[your trigger]
chance = 0.4
elementsA = 0
elements = 0
- empty event : set elements = array.height*array.width*array.depth
set elementsA = elements * chance
-- system compare: random(1) less or equal elementsA/elements: set at (array.curx, array.cury ,array.curz) = A
substract 1 from elementsA
substract 1 from elements
-- else: set at (array.curx, array.cury ,array.curz) = B
substract 1 from elements
examplatory runthrough what it does:
4 places: oooo
Let's sayA has a chance of 0.75. Elements is 4, so elementsA is 3 -> we get a chance of 3/4.
for first place the system rolls: rand(0) < 3/4 ->
Aooo
A's chance is now 2/3 (since elementsA was substracted by 1 as well as elements)
for the second place the system rolls a 0.54 ->
AAoo
A's chance is now 1/2
now the system rolls 0.8 ->
AABo
for the last roll the chance for A is 1/1 ->
AABA