Text this: Design of beamforming for IRS multi-partition-aided THz multi-subarray