Do all ashes - wood-ash, charcoal-ash, etc. - turn into an alkaline thing like lye if soaked in water for a prolonged period of time?
What is commonly called ash is the mineral matter in the biomass or coal burnt at ordinary combustion conditions (below ash fusion temperatre). Note that if you burned charcoal in an oxygen blown gasifier (or an oven with burning temperature in the range of +2700 F) the resulting ash is sort of like ceramic pellets that does not make lye. Sometimes if your grill burns “too hot” - you will find ash clinkers too - fused ash into glass like formations.
Ash (or more appropriately Mineral Matter) in biomass (or coal) has alkaline minerals - Sodium, Potassium, Calcium & Magnesium. It also has acidic minerals - Silica and Phosphorus. Most of the ashes will produce an alkaline lye - however a few like rice husks may produce an acidic lye because rice husks have a lot of silica.
For pet-coke or refinery bottoms - there are two other components to ash - Vanadium and Nickel. Vanadium survives ordinary combustion because of its high ash fusion temperature. Alkalinity wise, pet-coke also produces an alkaline ash - however if there is un-burnt sulfur, it can be acidic.
Whether from the combustion of coal in fossil fueled power plants or from other organic matter, the compostion of leached solutions of ash and water will vary considerably from the alkaline to acidic.
For coal, if it is western coal (low in sulfur) then the ash-water mixture will be alkaline due to the higher content of calcium and magnesium in the coal whereas eastern coals will normally produce acidic ash-water mixtures due to the presence of sulfates and lower concentrations of calcium and magnesium and higher concentrations of iron.
Air burnt magnesium will release ammonia when added to water. You get a better yield if you burn it in pure nitrogen.