The API docs misstate the acceptable arguments to add_group. It can be an Entity, a list of Entities, or an array of Entities. The model’s Entities collection is none of those. So,
In your first two examples, you need to convert the entities collection into an array using #to_a
group=model.entities.add_group(Sketchup.active_model.entities.to_a)
In third example, you have created an Array with entities.count nil objects in it and then pushed Entities onto the end of it. Push appends without changing the original contents, so all those nils are still present. To create an empty array, use
entitiesArray=[]