fix a performance issue converting lists to arraybuffers

Fix a performance issue converting Dart lists to arraybuffers. W/ the old conversion, I believe we were doing a JS interop call per element in the array.

@financeCoding @keertip