You can do the same sort of nested data in Perl and therefore in problems. The following should be something that would work.
@BX = ( [ 1, [2,4,5,8,11] ], [ 2, [2,3,4,5,8,11] ], [ 3, [3,4,8,11] ] );
$j = random( 0, scalar(@BX), 1 );
$b = $BX[$j]->;
$x0 = $BX[$j]->;
Now $x0 is a list reference. Thus if $j is 0, @$x0 is the list (2,4,5,8,11) and we can dereference elements of the list with the arrow operator: $x0-> is 5.
Does that help?