Text this: Phase-field modeling of microstructural pattern formation in alloys and geological veins