Local Photothermal Control of Phase Transitions for On-demand Room-temperature Rewritable Magnetic Patterning