Please try following:
arr=("list of IPs separated by space")
for i in ${arr[*]}
do
echo -n "$i "
ssh user1@$i "uptime"
done
user user1 should be able to access all IPs or we will have to use key value(associative arrays) instead of this simple one.