Semiconductor nanostructures for thermal and thermoelectric applications