Subset Sum solution in Deluge

Subset Sum solution in Deluge

I'm trying to figure out how to implement a feature that requires the Subset Sum algorithm. Use case is pretty simple--processing a single customer payment against a subset of open invoices, but I don't know which specific invoices the customer payment applies against, only the total payment amount, and the amounts of the invoices that could possibly be paid.

I understand List is deprecated, and I'm having difficulty figuring out how to manipulate Collections as I would a typical 2D array in other programming or scripting languages. I'm trying to implement the dynamic programming method. 

https://coderbyte.com/algorithm/subset-sum-problem?stay=true

Does Deluge have simpler get/set methods for 2D collections? E.g., equivalent to myCollection[index][index] = value;

Any suggestions?