Yes, in foobar2000 (fb2k) have inbuild feature for playing from RAM, but it disable default. For playing from RAM in foobar2000 need go to: Main menu > File > Preferences > Advanced > Playback, and set "Full file buffering up to" to whatever maximum file size you wish to be buffered completely to RAM. I.e. you need set value for option "Full file buffering up to". Notice, value there need specify in kb (kilobytes). I remind, what 1 megabyte = 1000 kilobytes, i.e. for, e.g., 10 megabytes need specify 10000 kilobytes, 20 mb = 20000 kb, etc.
Also for this you can install different components (modules, plugins, addons). E.g., component "RAM-Disk".