Integer[] shapeArray;
int setSize = 9;
int numberOfShapes;
shapeArray = new Integer[setSize];
PShape[]c = new PShape[setSize];

 float rd = random (0,100); 
  if (rd <=33) { 
  numberOfShapes = 1;

  } else if ((rd > 33) && (rd < 66)) {
    numberOfShapes = 2;

  } else {
    numberOfShapes = 3; 
  }

for(int i = 0; i<setSize;i++){
  shapeArray[i] = i;
}

Collections.shuffle(Arrays.asList(shapeArray));
 
for(int i = 0; i<numberOfShapes;i++){
  println(shapeArray[i]);
  String fileName = "forme_" + nf(i, 3) + ".svg";
    c[i] = loadShape(fileName);
   shape(c[i], 25, 25);
}