I finally stumbled upon the solution by utilizing Function.prototype.apply() as recommended in another helpful response on Stack Overflow.
Illustration of Function.prototype.apply()
let myArray = ["1", "2", "3"];
docRef.update({
test: firebase.firestore.FieldValue.arrayUnion.apply(this, myArray)
});
Illustration of ECMAScript 6
utilizing the spread argument feature
let myArray = ["1", "2", "3"];
docRef.update({
test: firebase.firestore.FieldValue.arrayUnion(...myArray)
});
By employing either of the aforementioned methods to pass an array, Firestore will solely append new elements that are not already present in the Firestore array.
For instance, executing the above code and then running the subsequent
let myArray = ["2", "3", "5", "7"];
docRef.update({
test: firebase.firestore.FieldValue.arrayUnion(...myArray)
});
will only add "5" and "7" to the Firestore array. This approach is also effective for arrays containing objects.