In Lua, I know there is
table.remove(array, index)
Is there a quick way to remove and return X elements from an array (without repeated calls to table.remove)?
Not; The API does not delete or return multiple items from a table. You can use table.remove , array[index] = nil or dump array to an empty table and repopulate (if you have majority elements).
table.remove
array[index] = nil
array