item = $data_items[rand($data_items.size)]
weapon = $data_weapons[rand($data_weapons.size)]
armor = $data_armors[rand($data_armors.size)]
Will give you one of those at random. If you only want one within a range of ids, try:
id_arr = [1, 2, 3, 4, 5, 8, 20]
item = $data_items[id_arr[rand(id_arr.size)]]