I understand that you’re trying to find a particular matching element of an array using $indexOfArray. There is no easy way to write this in C# as ElementAt takes an int32 and not a predicate. We would need to implement an extension method such as ElementMatching that could take a predicate and translate it into $arrayElemAt and $indexOfArray.
Alternatively CSHARP-3958 will allow you to sort arrays using the new $sortArray operator introduced in MongoDB 5.2. You could then sort by LastModifiedDateTime descending and take the first element. CSHARP-3958 is still a work in progress, but will be available in an upcoming release.
In MQL. $field is equivalent to $$CURRENT.field. (See $$CURRENT.) Thus {$max: "$Payments.Date"} is equivalent to {$max: "$$CURRENT.Payments.Date"} and since $$y is the same as $$CURRENT, the two formulations are the same.
Inserting some test data and running the MQL in the mongo shell, we see the expected result returned.
If you have a test case that does not produce the expected result, please consider filing a CSHARP or SERVER ticket so that we can investigate further.