I know there is a function to make your bitcoins unspendable until block X.
Yes, it's possible to create a
time locked transaction; In this condition, a transaction would not be available for verification or confirmation untilt the blockheight indicated in the transaction, this means it would be unspendable by the receiving address until the specified time. This of course comes with it's pros and cons;
• The transaction can be cancelled by the sending address,
• There can be a change to the Bitcoin network in the distant future that will render the transaction invalid.