Thin-film transistors (TFTs) and field-effect transistors (FETs) are basic units to build functional electronic circuits and investigate transport physics. In conventional TFTs or FETs, performance in terms of current level, on-off ratio, and the sensitivity of detection is limited by homogeneous semiconducting layers. In this paper, we develop TFTs with submicron heterostructures by using a strategy based on near-field photolithography. We use an array of total-reflective polydimethylsiloxane pyramids or trenches as a soft photomask in photolithography to induce multiple reflections and diffractions to focus the light. The textured feature enables the generation of gaps, dots, and grids at the nanoscale, with dimensions as small as sub-100 nm on substrates at the centimeter scale. We demonstrated the very high performance oxide TFTs on the nanoscale and periodic degenerately doped heterojunctions, and they yielded a nearly 20-fold increase in transconductance and apparent device mobility. The on-off ratio was higher than 109, with notably enhanced output current and clear scaling effect with channel length. We also built nanostructured wide-gap/narrow-gap heterojunctions to balance the high on-off ratio and sensitive photoresponse in a unidirectional phototransistor. This study shows the viability of programming a variety of nanoscale submicron patterns or interfaces in TFTs and FETs to significantly enlarge the scope of research on multifunctional TFTs and FETs.