$redisClient -> setex('key', 3600, 'value' );
$redisClient -> psetex('key', 3600, 'value' );
and yes, serialize the data with serialize or jasn_encode.
psetex is precise
setex, meaning the units for the TTL are in milliseconds, not in seconds. See https://redis.io/commands/psetex
As value, you can set any binary-safe string. You can store an array serialized in your preferred format, like JSON or CSV, but every operation you do on the array you have to read in full and write back in full.
Consider the other data types in Redis: lists, sets, sorted sets, hash (maps). Chances are another data type is a better fit for your requirement. See https://redis.io/topics/data-types
You can always set an expiration on any type of key using