Lateral programmable metallization cell devices and applications