I want to make some tablelike object, that will automatically show
current page names in layout and their numbers, but
i don't really know how to do this. May be there is some query commands,
like REQUEST (LayoutPagesNumber),
or REQUEST (LayoutPage_Names[])
Why don't you use a custom "Sheet index" in the "Project Indexes" that you find in the project map? If you customize it, or create a new one, you will get a almost exactly what you are looking for an automatic table of content. If you use the criteria smartly (filters) you can even exclude some of the layout for example the one were the table is placed 😉