Functional languages like Lisp and Haskell are particularly adept for your use case, as their paradigm is fundamentally designed to easily process structured data (be it lists, strings, tuples, tables or whatever) with constructs like map, reduce, cons, car, cdr and plenty more.
Although really, you can do this in any language, as it's not that specialized. Just grab a numerical computing library and I assume it'll be arbitrary.