--- Quote Start ---
to recreate the RAM each time in case some inputs are different?
--- Quote End ---
recreate seems to be an inappropriate term in my opinion. The RAM is actually created during compilation, or at FPGA configuration time, whatever view you prefer. I guess, you intend to reload the RAM content from a ROM. That's possible, but only sequentially, one address per clock cycle. You have to code a sequencer to perform it.
To initialize a RAM once, you don't need an additional ROM. Simply assign a *.mif or *.hex initialization file to the RAM. But unfortunately, you can't "replay" the initialization during runtime.