Javascript arrays helper LINQ style