How can I handle so that each time the user adds another vehicle, it adds it to the document as an array?
You can achieve this by simply calling update() method like in the following lines of code:
FirebaseFirestore rootRef = FirebaseFirestore.getInstance();
DocumentReference vehicleIdRef = rootRef.collection("vehicles").document("vehicleId");
Vehicle vehicle = new Vehicle("VehicleName");
vehicleIdRef.update("vehicleArray", FieldValue.arrayUnion(vehicle));
Which will atomically add a new "Vehicle" object to the "vehicleArray" array field. More informations here.
Please also note, that this technique will work only if you don't have a Date property in your class, otherwise you'll get an error like this:
Caused by: java.lang.IllegalArgumentException: Invalid data. FieldValue.serverTimestamp() can only be used with set() and update()