Electrical and Optoelectronic Devices from Two-Dimensional Materials for Advanced and Integrated Functionalities