Update dinosaur_catalog.rb

wrapped in a function for, deleting elements from array