Update utils.py

I added two functions which convert list of arrays to an array and vice verse.