There is a Concat function in the Cosmos DB string functions, where it can take n number of string parameters and return the concatenated string as the result. You can use this function to achieve the desired result you are looking for.
Refer: https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/concat