A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Databases don't have object types like array, but tables.
You can define a variable as table and insert with a select statement data into, example:
declare @test table (object_id int, name sysname);
insert into @test
select object_id, name
from sys.objects;
select *
from @test