At it's simplest you are simply wanting to add and subtract items from a list:
Code:
var _index = ds_list_find_index( list, fruit_to_find );
ds_list_delete( list, fruit_to_find );
That takes care of getting rid of one of our fruit. To find a random fruit in that list:
Code:
var _random_fruit_to_choose = irandom( ds_list_size( list ) - 1 );
The -1 in this case is important. All data starts at position 0. So if we have a list of 3 items, they are index 0, 1 and 2, but if we count them we get 3. However, irandom will return a number 0 through 3, and 3 would be too high. So we reduce that number by 1 and get 0 through 2, which represents the positions in our list. The hardest part of what you are asking is adding a fruit back to the list, but this just requires you to also have a list of all the possible fruit to add back:
Code:
var _random_fruit_to_choose = irandom( ds_list_size( list_of_collected_fruit ) - 1 );
ds_list_add( list_of_fruit_to_collect, list_of_collected_fruit[| _random_fruit_to_choose ] );
ds_list_delete( list_of_collected_fruit, _random_fruit_to_choose ] );
The main idea here is that if you've tracked which fruit you have collected, it's very easy to just randomly pick one of those to put back. I hope this information gets you started, but if you still don't understand we'll certainly try our best until you do.