Design of bifunctional phase-change device for storage memories and reconfigurable metasurfaces