moved copying of array out of for-loop and used slice instead
moved copying of array out of for-loop and used slice instead

hoxton-one/deepstream.io,deepstreamIO/deepstream.io,hoxton-one/deepstream.io,deepstreamIO/deepstream.io,deepstreamIO/deepstream.io