1. A smart phone or tablet, comprising: an array of laser diodes configured to generate light having one or more optical wavelengths, wherein at least a portion of the one or more optical wavelengths is a near-infrared wavelength between 700 nanometers and 2500 nanometers, and wherein at least a portion of the array of laser diodes is configured to be pulsed; one or more lenses configured to receive a portion of the light from the array of laser diodes and to direct the portion of the light from the array of laser diodes to a sample; a detection system comprising a photodiode array with a plurality of pixels coupled to CMOS transistors; wherein the detection system is configured to receive at least a portion of light reflected from the sample, and wherein the detection system is configured to be synchronized to the light from the at least a portion of the array of laser diodes; wherein the detection system is configured to perform a time-of-flight measurement by measuring a time difference between the generated light from the at least a portion of the array of laser diodes and the at least a portion of light reflected from the sample; wherein the detection system is further configured to: receive light while the array of laser diodes is off and convert the received light into a first signal; and receive light while at least a part of the array of laser diodes is on and convert the received light into a second signal, the received light including at least some of the at least a portion of the light reflected from the sample; and wherein the smart phone or tablet is configured to difference the first signal and the second signal and to generate a two-dimensional or three-dimensional image using at least a portion of the time-of-flight measurement; and wherein the smart phone or tablet further comprises a wireless receiver, a wireless transmitter, a display, a voice input module, and a speaker.