sorted parallel array data structure in Javascript programming language