Started on proper array write method (unstable)