If you don't need to remove a single one from the group, then you can use either of these:
// Removes the markers from the map, but keeps them in the array.
function clearMarkers() {
setAllMap(null);
}
// Deletes all markers in the array by removing references to them.
function deleteMarkers() {
clearMarkers();
markers = [];
}
Otherwise, you have to loop through the items and find the specific one at the index and do something like this:
markers[indexOfMarker].setMap(null);