Update utils.py

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