interpolate: better handling of indices

at the moment, function will only work properly as long as the points
are within the domain of the field, when shifted properly with the
offset. i.e. I'm ignoring the case when field is periodic and there are
points outside the initial domain.
This should be fixed in the future.