set aList to {1, 2, 3, 4}
set item 4 of aList to 100
aList
--> {1, 2, 3, 100}
tell application "Safari"
set item 4 of aList to 0
end tell
aList
--> {1, 2, 3, 0}
tell application id "com.adobe.indesign"
set item 4 of aList to -10
end tell
aList
--> {1, 2, 3, -10}