to and from array