Multipartite nonlocality and boundary conditions in one-dimensional spin chains