If your script first sets a $Variable to this value, the "calculation" option can be used with the variable in your script to assign this value to all records in your found set.
But then you will need to consistently run this script every time you:
- Change this data
- Add new contact records for this account
A better approach would be to set up the needed relationships so that you never need to run this script in the first place.