This is wrong for two reasons:

1. use _make_object to get a Dat of the correct type
2. it will fail in parallel because y.array does not include ghost points whereas the Dat should.  You need to build the dat, set the local data and then set needs_halo_update to True.