memory to array