I'm no programmer but in C2 I would start out by doing this :
Choose a random number for question, if question Q is 5,0 in array then A = 5,1 (or simply 5, the x-coord of the question and answer)
Generate a random number for B probably use floor(random(array.total)), check the outcome does not equal A then use that for B.
Do the same to generate C, making sure it is not the same as A or B, and for D make sure it does not match A, B or C.
Then you have 4 answers A, B, C and D that are numbers i.e. 5, 6, 1, 22 that match the co-ords of the array, where A is the correct answer and B, C and D are random answers.
Then assign A, B, C and D randomly to 4 numbers 1, 2, 3 and 4 that match the answers boxes.
There are probably better ways of doing this but that would be my initial approach.