The complex circumstellar environment of supernova 2023ixf