Black Scholes PDE and its many solutions

The Black-Scholes formula involving the standard normal distribution is specific to call or put options. The Black-Scholes formalism, relating the prices to random walks and PDE, works for pricing a European option with arbitrary payoff. For any boundary condition (except some artificial ones with incredibly rapid growth that makes the random walk expectations diverge) the price is the expected value of the option value at the time of maturity, the expectation taken over price paths of the underlying security whose "risk-adjusted" drift and volatility are calculated from the parameters assumed to govern the "physical" price movement. So one does not need the whole theory of random walks, just the probability density of where the risk-adjusted path will land at the time of maturity, and integrating the European option payoff against this density will give the answer. The Black-Scholes theory shows that the result satisfies the PDE.

Alternatively, Black Scholes is, after a change of variables, equivalent to a "backwards" heat diffusion equation -- one whose time parameter is $(-t)$, or better, $(T_{m} - t)$ where $T_m$ is the maturity time of the option. So your question is the same as asking for all solutions of the heat equation. I assume that means heat diffusion with arbitrary boundary conditions. As long as the boundary conditions do not grow extremely fast the expectation of a random walk gives the solution.