Assign the variable at declaration time if it's known at declaration time. Else it's initialized with NULL and you need another statement to assign it. A small waste of code and performance.
DO
$$
DECLARE
dateval date[] := '{2015-4-12, 2015-4-19}';
BEGIN
-- do something
END
$$;
You just need the right syntax for either aan array literal or an ARRAY constructor.
The string literal above needs no explicit cast, since the type is defined in the assignment implicitly.
Related: