Amortized Probabilistic Conditioning for Optimization, Simulation and Inference