Spatial computing for the control of working memory