choose random array element

//float f[] = float[](array(1, 2, s, t, length(P-L), length(N)));
float array[] = float[](array(0,1,2,3,4));
int j;
float temp;
for (int i = 0; i < len(array); i++) {
j = floor(fit01(random(i + @Time*10),0,5));
i@jv = j;
temp = array[j];


}
@a = temp;
//rotate around N random
float angle = radians(chf("angle"));
float cone_angle = radians(chf("cone_angle"));
float seed = chf("seed");
vector axis = v@N;
vector rand_offset = normalize(sample_sphere_cone(axis, cone_angle, vector(rand(@ptnum + seed))));
axis = normalize(axis + rand_offset);
vector side = cross(axis, {0,1,0});
vector up = cross(axis, side);
vector front = axis;
matrix3 m = set(side, up, front);
vector4 q = quaternion(angle, axis);
vector4 orient = quaternion(m);
p@orient = qmultiply(q, orient);
float angle = radians(chf("angle"));
vector axis = v@N; 
vector side = cross(axis, {0,1,0});
vector up = cross(axis, side);
vector front = axis;
matrix3 m = set(side, up, front);
vector4 q = quaternion(angle, axis);
vector4 orient = quaternion(m);
p@orient = qmultiply(q, orient);