Based on how light behaves when it passes through mediums, i.e. the wavelength of light changes when it passes through mediums of different refractive indexes, wouldn't it be possible to convert infrared light into visible light by passing it through a medium (e.g. $CO_2$)? Also, is it possible to make holograms from a device that works using this principle?
You need to distinguish between the frequency of light and it's wavelength. When light passes through a transparent medium with a refractive index $n$ greater than 1 the wavelength is reduced by a factor of $1/n$, however the frequency and energy of the light remains unchanged. When we refer to infra-red or visible light we normally mean it's frequency/energy. Although we often quote wavelength, e.g. visible light is 400-700nm, this is shorthand for wavelength in vacuum. So 800nm light passing through glass with a refractive index of 1.33 would decrease wavelength to about 600nm, but we would not consider it to be visible.
It is possible to increase the frequency of light by a process called frequency doubling, but this is a special case and requires materials with non-linear optical behaviour.
A hologram is basically just a complicated diffraction grating. Diffraction gratings normally work by selectively changing the intensity of the light, but it's possible in principle to make a diffraction grating that selectively changes the phase of the light. So it would in principle be possible to make a hologram from a material with a varying refractive index. However in practice I don't know of any way to do this.